Jump to content

Preg Match


jaymc

Recommended Posts

[quote author=roopurt18 link=topic=119182.msg487787#msg487787 date=1166486062]
I think you need to use grouping:
[code]<?php
$patterns = "/(\\msn.com)|(\\hotmail.com(.uk)?)/";
if (preg_match($patterns, $string)) {echo "yes";}
?>[/code]
[/quote]

That works but it doesnt match hotmail.co.uk...

Huh?

And too the other guy, you cant return msn.co.uk as valid..
Link to comment
https://forums.phpfreaks.com/topic/31172-preg-match/#findComment-144095
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.