I don't think this is right, particularly the bit about the character class. Within a character class definition ("[]"), an asterick matches an asterick--it doesn't have a meta-meaning within a character class. So what that character class actually matches is alphanumerics, the underscore, and an asterick. And it matches it *one time*-- not zero, not more than 1.> the literal string "frame=" > followed by a character class containing alphanumerics and the under +score > repeated zero or more times > ...
That's why just the "c" from "content" got included-- because the character class swipes up one character.
As an example, take a look at this:
This prints outmy $print_link = "http://www.foo.com/bar?method=go&frame=*content&name +=baz"; $print_link =~ s/frame=[\w*]&*//; print $print_link, "\n";
So the regex matched "frame=*".http://www.foo.com/bar?method=go&content&name=baz
In reply to RE: Re: Regexp problem
by btrott
in thread Regexp problem
by Maclir
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |