in reply to Re: Regex error when [] occurs in file..
in thread Regex error when [] occurs in file..
Thanks both---I didn't realise that $' was treated like that. Are all 'special variables' ($&, $N (N is integer)) expanded in that way too? So if you did something like:
V. interesting---I assumed that special characters inside the rest of the data would be ignored..
Cheers
<--edit to make the last sentence make more sense!-->
........
Those are my principles. If you don't like them I have others.
-- Groucho Marx
.......
would you match$temp =~ m/(\[0-9\])blah$1/;
rather than$temp = "[0-9]blah6";
?$temp = "[0-9]blah[0-9]";
V. interesting---I assumed that special characters inside the rest of the data would be ignored..
Cheers
<--edit to make the last sentence make more sense!-->
Those are my principles. If you don't like them I have others.
-- Groucho Marx
.......
In Section
Seekers of Perl Wisdom