(Sorry but I have problem with my ISP, so I repost !) Uri Guttman wrote:
> > how do you know when a keyword section begins or ends? how large is this > > file? could free text have keywords? i see a ; to end a word list but > > that isn't enough to properly parse this if you have 'free text'. > > > > osc> Is it possible to do this with regular expression ? > > osc> Or should I write a small parser ? > > > > yes and yes. > > > > osc> I have tried pattern matching with the 's' and also with the 'm' > > osc> option, > > osc> but with no good result ... > > > > please show your code. there is no way to help otherwise. s/// is not a > > pattern matcher but a substitution operator. it uses regexes and can be > > used to parse things. > > > > uri > > Hi Uri, Sorry, code is at my office !!!! The free text can not contain keywords. And keywords start at the beginning of a line. The list of words is terminated by a ";". For the pattern matching I have used the option s: m/pattern/s, to swallow the different \n. Olivier -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/