robert_gsfame Posted July 27, 2009 Share Posted July 27, 2009 friends, how can i prevent " \ " this special character using ereg for example " . " then i will use ereg("\.",$data) so how bout " \ " and how prevent those special such as "." "*" "%"characters being typed in one preg thanks Link to comment https://forums.phpfreaks.com/topic/167633-ereg/ Share on other sites More sharing options...
Daniel0 Posted July 27, 2009 Share Posted July 27, 2009 All characters are always escaped using the backslash character, including the backslash, so that would be \\ You should use preg_match instead of ereg though. ereg() is slower than preg_match() and it's officially deprecated in PHP 5.3. Link to comment https://forums.phpfreaks.com/topic/167633-ereg/#findComment-884061 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.