Kristofer Wolff wrote, on Wednesday, September 19, 2001 7:41 AM
:               $pr =~ s/\#\[change\]\<(.*)\>\[change\]\#/$USERDATA{$1}/g
: 
: it runs fine with a line like:
: 'hi folks, i am using Perl [change]perlversion[change] and i have 
: a problem
: with Regex'
: 
: but now i have 2 changings in one line like:
: 'hi folks, i am using Perl [change]perlversion[change] and i have 
: a problem
: with [change]problem[change]'

You want non-greedy matching: (.*?)
Or if you're not going to have any quoted strings in
the variable name you're replacing, you can use ([^>]*)

Good luck,

Joe

==============================================================
          Joseph P. Discenza, Sr. Programmer/Analyst
               mailto:[EMAIL PROTECTED]
 
          Carleton Inc.   http://www.carletoninc.com
          219.243.6040 ext. 300    fax: 219.243.6060
 
Providing Financial Solutions and Compliance for over 30 Years
 
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to