If I read you right, you want to test that the string starts with either a "/" or "http://localhost.net" (with variations). On that assumption, an alternation (plus some variation) should do it (/x whitespace added for clarity):
m,^(?: / | http:// [^/]* \b localhost\.net ),x
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
In reply to Re: Conditional Regex
by Sidhekin
in thread Conditional Regex
by zer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |