On Jul 30, David Wood said: >$str = qq( ><udb:person> > <data_one>some data</data_one> > <data_two>some more data</data_two> ></udb:person> >); > >What I need to do is something like:- > >$str =~ s/<udb:[^>]+\n(.*?)<\/udb:$1>/$sub->($1,$2)/gs; Even if you change the $1 to a \1, it won't match, since you have <udb:[^>]+\n when you need <udb:[^>]+>\n -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Matching within the LHS of a regex...
Jeff 'japhy/Marillion' Pinyan Mon, 30 Jul 2001 08:42:58 -0700
- Matching within the LHS of a regex... David Wood
- Re: Matching within the LHS of a regex.... Peter Scott
- Jeff 'japhy/Marillion' Pinyan