Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
How to modify the below regex and
https?://(www.)?(abc.com|fdsf.com|3545ab.com|tyrty.com)[^/]*/.*/.*/.*/.*/
URL: https://www.abc.com/gallery/sdasd/sdfdsf/sdfdsf/
If after domain name and an slash, if gallery is present then this regex should not match and any string other than "gallery" should be matched , Please tell how to modify the above regex.
https?://(www.)?(abc.com|fdsf.com|3545ab.com|tyrty.com)[^/]*/gallery/.*/.*/.*/should not match https?://(www.)?(abc.com|fdsf.com|3545ab.com|tyrty.com)[^/]*/news/.*/.*/.*/ should match
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Avoid a single value in the url
by Anonymous Monk on Jan 24, 2013 at 09:48 UTC | |
Re: Avoid a single value in the url
by ansh batra (Friar) on Jan 24, 2013 at 09:46 UTC | |
Re: Avoid a single value in the url
by Anonymous Monk on Jan 24, 2013 at 09:49 UTC | |
Re: Avoid a single value in the url
by sen (Hermit) on Jan 24, 2013 at 09:54 UTC | |
by roboticus (Chancellor) on Jan 24, 2013 at 11:51 UTC |
Back to
Seekers of Perl Wisdom