Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Apps and Programs
how can i search and replace email addresses in a text file?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="technologist" data-source="post: 843849" data-attributes="member: 4134"><p>What you're looking for is a regular expression, and a program that supports them.</p><p></p><p>I'd suggest you start with this expression, which is basically <a href="http://www.regular-expressions.info/index.html" target="_blank">the one described here</a> but modified so that it instead matches a single space followed by a generic email address, instead of the address itself.</p><p>[code]\ (?=[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)[/code]</p><p></p><p><a href="http://www.barebones.com/products/TextWrangler/" target="_blank">TextWrangler</a>, which is free, and BBEdit (from the same company) support regular expressions. Open your file, select <strong>Search > Find...</strong>, paste in the expression and check the "Use Grep" box.</p></blockquote><p></p>
[QUOTE="technologist, post: 843849, member: 4134"] What you're looking for is a regular expression, and a program that supports them. I'd suggest you start with this expression, which is basically [url=http://www.regular-expressions.info/index.html]the one described here[/url] but modified so that it instead matches a single space followed by a generic email address, instead of the address itself. [code]\ (?=[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)[/code] [URL=http://www.barebones.com/products/TextWrangler/]TextWrangler[/url], which is free, and BBEdit (from the same company) support regular expressions. Open your file, select [b]Search > Find...[/b], paste in the expression and check the "Use Grep" box. [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Apps and Programs
how can i search and replace email addresses in a text file?
Top