use 5.010; while (<DATA>) { chomp; /(?=.*username=(?<username>[^&]*))(?=.*id=(?<id>[^&]*))/ or next; say "username = $+{username}; id = $+{id}"; } __DATA__ http://beta.websitename.com/tool/view/mb/file?username=anirudh007&id=4 +3242342 http://beta.websitename.com/tool/view/mb/file?id=3323213&username=anir +udh007 username = anirudh007; id = 43242342 username = anirudh007; id = 3323213
In reply to Re: Regular Expresion
by JavaFan
in thread Regular Expresion
by anirudh_sml
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |