My ultimate goal is to create a regex expression that can be used use to extract fields from any record made up comma-seperated fields. For example, if a normal event looks like this:
"RADSP01HDQRW","IAS",04/02/2012,16:14:38,2,,"RETAIL\HH01-9002",,,,,,,,0,"10.170.191.48"
it will always contain 15 commas, therefore 16 fields.
I created the regex expression below and tested it with UltraEditPro.
[^,](?=(,[^,]){15,15}$)
It will find the 1st field. In order to make it find the 2nd field I simply replace (15,15) with (14,14).
Everything looked great in UltraEdit but when I pasted it into the Field Extraction UI
it complained...
Invalid regex: no named extraction at position 7 (i.e., "=(,[^,]*){..."). Expected "(?P pattern)"
I tried various combinations before thinking surely someone else has already tackled this problem... so here's hoping!
... View more