otuatail Posted March 24, 2014 Share Posted March 24, 2014 <?php // Library SMS3S Version 1.0.0 15-03-2014 include ("../secure/SecureFunctions.php"); session_start(); Session_Init(); $name1= "O'Brian"; // Match O' if second character is (') $name2 = "Robinson"; $myReg = "/(O')[A-Za-z]{12} | [A-Za-z]{14}/"; if(preg_match($myReg, $name1)) echo "Yes"; else echo "No"; echo "<br><br>"; if(preg_match($myReg, $name2)) echo "Yes"; else echo "No"; ?> I am trying to put together a simple surname match with a slight difference. Any help on RexX? Link to comment https://forums.phpfreaks.com/topic/287226-regx-problems/ Share on other sites More sharing options...
Psycho Posted March 24, 2014 Share Posted March 24, 2014 I can't tell what you are trying to do based upon your "explanation" or from the code you have provided. Link to comment https://forums.phpfreaks.com/topic/287226-regx-problems/#findComment-1473717 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.