“Unknown modifier 'g' in…” when using preg_match in PHP?

EinsWoelfin1970

New Member
This is the regex i'm trying to use:\[code\]/^(\w|\.|-)+?@(\w|-)+?\.\w{2,4}($|\.\w{2,4})$/gim\[/code\]I found it on this site, and it works great when i try it out there. But as soon as i place it in my code i get this message:\[code\]Warning: preg_match() [function.preg-match]: Unknown modifier 'g' in C:\xampp\htdocs\swebook\includes\classes.php on line 22\[/code\]Can anyone explain what's wrong, and why it's working on that website and not in my code?Thanks a bunch!
 
Back
Top