I know this question is everywhere on here - but im missing some detail, either due to brain fart or... I figured this out a few weeks ago and either deleted it or forgot to document it now i can't seem to figure it out again. Argg - thanks for your help!
Heres the one liner:
perl -i -ne 'print unless /EXP/' file
This prints contents minus the line in the match.
1. Needs to be in perl script not a one liner.
2. Needs to remove the line from a file permanently
3. There are 3 columns in the file, we only know the content of one portion of the line.
Example data from dbfile.txt:
The only information we have is domain_5.com so we need to remove that entire line containing that domain.
I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx..
Use Unix file format while saving Your script.
otherwise it will have ^M s or smth likely weird in the EOL,
Then DO NOT use m…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions.
Consider email address RFCs:
Look at HTML5 form input element (with type=email) regex pattern: