in reply to url get variables regex
$arr[0..$count] = $url =~ /(^http:\/\/.*?)\?(?:([\w\d]*=)(?:.*[&]{1,}) +)*/gi;
looks more like I think you want although I haven't reviewed your regex in detail. When you put the regex match in a list context, @arr will get all the matches from the /g global match option.@arr = ($url =~ /(^http:\/\/.*?)\?(?:([\w\d]*=)(?:.*[&]{1,}))*/gi);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: url get variables regex
by clone4 (Sexton) on May 13, 2009 at 23:54 UTC |