a late reply ... Bart Lateur wrote: > > On Sun, 21 Apr 2002 16:08:44 +0800, allan wrote: > > >s/(<pre>>.+?<\/pre>)|(.*?)/&onesub($1)||&anothersub($2)/igesms; > ^^ > Perhaps this is part of your problem.
ok i went too fast. but it was actually more the calling of subs that failed and wanted to know how to. your solotion is brillaint (and obvious) > Anyway, the syntax you're looking for, is IMO more like > > s/(<pre>.+?<\/pre>)|(.*?)(?=<pre|$)/$1?onesub($1):anothersub($2)/ismeg; > > (although the order of the options doesn't really matter) > > Note that a bare > > (.*?) > > will match nothing, as you have nothing to anchor it against. Match > minimal until what? So I've chosen to pick a "match to the next "<pre" > or to the end of string. You can change it if you dont't like it. i love it! .) thanks once again ../allan