wolfger has asked for the wisdom of the Perl Monks concerning the following question:
I whipped up a quick regex today to satisfy a range of possible domain names, and while it matches everything I want, it also matches a few things I don't want. Easy enough to error-proof with an "if", but I'm wondering if there's a way to wrap this all up in one regex. Here's what I have:
abc[123]\.xy[z1]1?\.nota\.urlThe only problem is in the xyz11? part of the expression. I want to match xyz, xy1, and xyz1, but not xy11, and I couldn't figure out how to limit that.
Back to
Seekers of Perl Wisdom