D3xt3r Posted June 16, 2008 Share Posted June 16, 2008 Here is my issue. I am the developer of XDD (Xegment Delta Databasing), FlatFile databasing system. But I need a easy way to do something.. When searching through a FlatFile database, the system uses preg_match for each line to detect matches. I need to find a way to auto-backslash any operator characters that PHP may not read as standard text.. So a user can search any term, such as "02/05/2008" or alike. Now, I could go down a huge str_replace line and replace each character, but I want a easier way to do this... If all else fails, I could just get a script to backslash every character in the user defined string. That would work as well, since PHP doesn't care if you backslash unneededly. Any idea? Link to comment https://forums.phpfreaks.com/topic/110380-auto-backslash-preg_match-op-chars/ Share on other sites More sharing options...
corbin Posted June 16, 2008 Share Posted June 16, 2008 http://php.net/preg_quote Link to comment https://forums.phpfreaks.com/topic/110380-auto-backslash-preg_match-op-chars/#findComment-566310 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.