kickassamd Posted May 22, 2008 Share Posted May 22, 2008 I cannot figure out how to get preg_match to match = <= >= != I had a simple function that looked for each but the problem with that is it found = when it was really <= so is there a way with regex to match ONLY the character supplied? Quote Link to comment https://forums.phpfreaks.com/topic/106725-preg_match-issues/ Share on other sites More sharing options...
sasa Posted May 22, 2008 Share Posted May 22, 2008 <?php $a = '2 = 3 and 5 != 5'; preg_match_all('/(<=)|(>=)|(!=)|(=)/', $a, $b); print_r($b[0]); ?> Quote Link to comment https://forums.phpfreaks.com/topic/106725-preg_match-issues/#findComment-547107 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.