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? 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]); ?> Link to comment https://forums.phpfreaks.com/topic/106725-preg_match-issues/#findComment-547107 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.