Wednesday 15 June 2011

regex - I'm using Perl to extract data from the following text data (text that look like this: ), I need to filter out data over linebreak but it doesn't work -


I am using the extract / correction text from the following text data:

  Bregkef 6 cents 27,67 kr 166,03 killer blandfowers "Behavior Ca 3 kilo kofters. SV" 3 kg 66,69 k 200007 Kiran Banan EKO 6 kg 22,54 kg 135,23 KR   

I want

  bengalers "Behwor ca 3 kilo kofters. Sv" 3 kg 66,69 kr 200,07 kr  

For

You can try under the Pearl One-liner command.

$ cat file Bryggkaffe 6 st 27,67 kr 166,03 kr Blendfors "Behöver ca 3 kg kotfärs sv" 3 kg 66, 69 kr 200,07 Kiran banan eko 6 kg 22,54 Kg 135,23 Crores Rupees -0777pe / / N + "[^"] * "// g 'file briegacafé 6 cents 27,67 kr 166,03 killer blandfowers 3 kg 66,69 k 200,07 Kiran banan eko 6 Kg 22,54k r 135,23 kR

OR

  perl -00pe 's / \ N + "[^"] * "" //g "file  

No comments:

Post a Comment