5 ms·
Substring location won't tell you if your string is an email, for example.
by xentronium 16y ago
Substring location won't tell you if your string is an email, for example.
- nowarninglabel 16y agoYes, good point.
- jonhohle 16y agoNeither will a regex [1] [1] http://www.regular-expressions.info/email.html http://www.regular-expressions.info/email.html
- iloveponies 16y agoThat totally depends on the regex: http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
- jonhohle 16y agoFrom the page you linked: > This regular expression will only validate addresses that have had any comments stripped and replaced with whitespace (this is done by the module). There is filtering done before the regex is applied.