> Shawn wrote:
> > 
> > I think this is what you are asking for...
> > 
> > $string=s/(\w+)_(NN|IN|AT)/$1/g;
> > $string='<SN>'.$string.'</SN>';
> > 
> > Shawn
> 
> I believe, there's a typo :-)
> $string =~ s/(\w+)_(NN|IN|AT)/$1/g;
>          ^

D'OH!  Thanks Andrea :-)

> 
> If speed is important, it's good to avoid capturing.
> so $string =~ s/(\w+)_(?:NN|IN|AT)/$1/g; is quicker.

Is there a big time savings since there is a capture anyway?

TIA,
Shawn


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to