Jul 8, 2001, 3:57 AM
Post #4 of 5
Re: Find text betwin 2 strings in a string
[In reply to]
your $between is 1 after that line, heh?
The problem is not the $a_str and the $v5, the problem is you have to call the regex match in list context to make it return the catched text. Just put brackets around the $between variable:
In scalar context (as you put it), the regex match returns a boolean indicating success.
($between) = $xline =~ /$a_str(.*?)$v5/;
Hope this helps.