Code
Test Data@list = grep (m/(?($_=~ m;^http;)localhost.net|^\/)/;
/sered/uplink <--test true
/my/projects/ <--test true
heh/reg <--test false
http://www.OtherNetwork.org/network/ <--test false
http://www.localhost.net/hello <--test true
Explained
ok so with this regex i want to test for the same scalar that the grep would currently be testing. Basicly saying, if it starts with an "http" it better be on this server. However if it doesnt start with that it has to start with a "/" for a sub directory.
Problem
I am unable to get this to work properly
Appologies
I am new to this advanced regex format so please be patient with me
In reply to Conditional Regex by zer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |