Regular Expression Pattern Extractor

ADO DOT NET

Well-known member
Joined
Dec 20, 2006
Messages
156
Hi
Using this REP I wanna extract all emails from a text:
Code:
/[A-Z0-9._-]+@[A-Z0-9][A-Z0-9.-]{0,61}[A-Z0-9]\.[A-Z.]{2,6}/i
And this is a sample text:
Code:
Dave
 
The problem is that you dont understand regular expressions well enough to realise that the leading / and trailing /i in the pattern youre trying to use are nonsense. I think theyre sed syntax but i dont really think it matters particularly, theyre clearly not helpful to you.

I stongly suggest you not use regular expression until you have some idea how they work, theyre complicated and often subtle and if you rely on them to work without knowing when theyre likely to fail youre going to end up missing or corrupting information in the rest of your application sooner or later.
 
Back
Top