E-posta ve URL'leri Bulma
Dağınık metinden iletişim bilgilerini çıkarma
E-posta ve URL'leri Bulma, CoddyKit'te ücretsiz bir NLP Academy dersidir. Bu, 4 dersinin 2. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, NLP Academy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. NLP Academy kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Patterns Hide in Messy Text
Real text is full of structured snippets like emails and links. Regex lets you pull these out automatically, even from long, messy documents.
What an Email Looks Like
An email has a name, an at sign, a domain, and an extension. Spotting that shape is the first step to writing a pattern for it.
A Simple Email Pattern
This email pattern grabs word characters, an at sign, more characters, a dot, and letters. It is not perfect, but it catches most real addresses.
re.findall("\w+@\w+\.\w+", "hi a@b.com")Why the Dot Needs Escaping
In a domain you want a literal dot, not the any-character dot. So you escape it as \. to match only a real period in the address.
Extracting Many Emails at Once
Pair your email pattern with re.findall to sweep an entire document and return every address it contains as a clean Python list.
emails = re.findall(pattern, text)What a URL Looks Like
A URL usually starts with http or https, then ://, then a domain and path. That predictable start makes it a great target for regex.
A Starter URL Pattern
This URL pattern matches http or https, then any non-space characters. The optional s after http is written with a question mark quantifier.
re.findall("https?://\S+", text)Optional Parts With the Question Mark
The question mark makes the part before it optional. In https? the s may or may not be there, so both http and https match cleanly.
Greedy Matching Can Overreach
By default quantifiers are greedy and grab as much as they can. With URLs this can swallow trailing punctuation you did not want.
Tame It With Boundaries
Use \S to stop at the first space, or trim the result afterward. Knowing where a match should end keeps your extraction tidy.
Test on Real Samples
Always test your pattern on messy real text. Edge cases like plus signs in emails or query strings in URLs reveal where it still leaks.
Quick Check
You want http to be optional in the s only. Which symbol makes the preceding character optional?
Recap: Pulling Out Contact Info
You built patterns for emails and URLs, escaped literal dots, and used the question mark for optional parts. Now you can mine contact info from text. 🔍
Sıkça Sorulan Sorular
“E-posta ve URL'leri Bulma” dersi ücretsiz mi?
Evet — “E-posta ve URL'leri Bulma” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve NLP Academy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. NLP Academy kursu toplamda 4 dersten oluşur.
“E-posta ve URL'leri Bulma” dersinde ne öğreneceğim?
Dağınık metinden iletişim bilgilerini çıkarma NLP Academy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
NLP Academy öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te NLP Academy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 2. dersidir.
“E-posta ve URL'leri Bulma” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu NLP Academy dersinde kod yazıp çalıştırabilir miyim?
Evet. Her NLP Academy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- 5 Dakikada Regex
- E-posta ve URL'leri Bulma
- Yakalama Grupları ve Değiştirmeler
- Regex ile Belirteçlere Ayırma İpuçları