On Dec 30, 2003, at 1:35 PM, Zary Necheva wrote: [..]
[..]How can I extract the text before the first occurrence of dot (.) or single space from the first field.
This is my file
LB1571 5TH .W43 1993|text1|text1| FICT. V.12|text2|text2| FICT.|text3|text3| HQ806 .B35 1995|text4|text4| G530.T6B4941988Q|text5|text5| MPCD11 .B42 P27|text6|text6|
you might want you want is to "clean" out the stuff between the 'first "word"' and the first | you are in the land of crazy RegEx Voodoo
say something like:
s/[\s\.]+[^\|]*//;
we need to see a "space" or a "." - at least one of them, and then any number of things that are NOT a "|" and we then just RIP them out of the pattern space.
HTH.
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>