Searching a string for a pattern Perl-compatible Regular Expression functions
if (preg_match("/\|/",$query_string)) { // Search $query_string for a pipe
… your code here … // Do this if pipe was found
Search a string for the presence of a pipe symbol
- Perform a regular expression match on a string.
- Return (true) if match was positive.
- The syntax for the pattern search closely resembles Perl.