There are, of course, heaps of regexps that can find an actual RFC822-compliant email address, and even check that you have got a working domain rather than or - but of course these are harder to construct. This gets around the one-email-address-per-line problem. The key problem with things like sed and Dunx's code is that your substitute regexp has to try to discard anything that isn't an email address, whereas a pure pattern match regexp only has to find the things that are email addresses. I'm not sure why you use map in that first Perl example, rab, since you could just do ' print join(" ", which does the required passing-of-list-context to the regexp and avoids a unused terminating space. Fourth sentence should begin "Then search-and-replace ++++**** in the scratch file." Whoops, there's an unintended hidden pseudo-tag there. Weary Crescent computer nerd - rest yourself here. Mornington Crescent - Let Me Check My Notes
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |