in reply to Perl Fool needs help
It's a quick and easy command line solution, although it (like all command-line scripts) could get a little bit ugly because of having to escape some characters for the shell (this is for unix):
perl -l -n -e "/address=(.*)/ and print \$1;" yourfile.txt > emails.tx +t
If your example is really as simple as it appears, a simple expression like address=(.*) should do the trick. You could be more paranoid and make it
which would only match lines that started with "address", not counting spaces, tabs, etc. You could also play around with using the @ sign. It all depends on exactly what your data looks like as to how complicated the regular expression could possibly get, but the above will probably catch most things./\s*address=(.*)/
|
|---|