> You want a look-ahead: > > $data =~ s{ > <(.+?)> # <, then one or more characters ($1), then > > (.*?) # zero or more characters ($2) > (?= <.+?> ) # look ahead for '<...>' (but don't actually match it) > }{<$1>$2</$1>}xg;
aah... this is a very useful part of regular expressions that i've never used nor understood untill now :) thank you very much for the help in figuring this out. i'll go off and play with this right now :) -- Willy http://www.hackswell.com/corenth -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>