ps2931 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to filter out rows from a large text files based on the criteria -
The allowed charcters are: aA-zA, underscore(_), colon(:), dot(.), forward slash(/), comma(,), hyphen(-) numbers(0-9) and double quotes (" ").
Any character other than the characters listed above is invalid. I want to print line which failed the criteria. The sample line from test file is something like:
2749 "CQWERC20F+XZIAQAAAQjLiDI9sNc=", "1","ds_uid","CWER1Y1mHZIAQAA8di +wRHfuwrM=","2012-10-14 18:41:44.429","2012-10-14 18:41:44.572","1975- +10-10 00:00:00.000","7307 mg rd","","naasik","NK","44026","IN","44063 +59999","","","","DEFAULT","","","AABBCCXX","","Qqwwee<feff>","","qqww +ee@yahoo.com","0","YOPANEL","","false","en","","","","","","","",""," +","","","","","","","",""
The above line is invalid since it has '<' symbol. Can anyone help me?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need regex to filter out unwanted rows
by Athanasius (Archbishop) on Sep 15, 2014 at 12:39 UTC | |
by AnomalousMonk (Archbishop) on Sep 15, 2014 at 12:59 UTC | |
|
Re: Need regex to filter out unwanted rows
by AnomalousMonk (Archbishop) on Sep 15, 2014 at 11:44 UTC |