csv-validator icon indicating copy to clipboard operation
csv-validator copied to clipboard

regex doesn't seem to work with multiline field values

Open DavidUnderdown opened this issue 7 years ago • 0 comments

I'm expecting some catalogue descriptions that will have a particular format that means there will be line breaks in them so I wrote the following test

regex("Registration Sub-District: [A-Z][a-z]{2,20}( [A-Z][a-z]{2,20}){0,3}\r\nCivil Parish[,;] Township or Place: [A-Z][a-z]{2,20}( \(part\))?((( )|(, ))[A-Z][a-z]{2,20}( \(part\))?){0,5}")

expecting it to match data like

Registration Sub-District: Paddington North Civil Parish, Township or Place: Paddington (part)

Within CSV Validator it gives an error and fail result, but on a Java regex tester this is OK and gives a match as demonstrated at http://www.regexplanet.com/share/index.html?share=yyyyyhejqar

DavidUnderdown avatar Apr 20 '18 15:04 DavidUnderdown