Regular Expressions...

From: Date: Fri, 31 May 2002 11:32:29 +0000
Subject: Regular Expressions...
Groups: php.general 
Request: Send a blank email to php-general+get-100077@lists.php.net to get a copy of this message
All, I have a text field that a user can enter text into, I then explode it into an array, and ultimatley build a regular expression such as: /(advance|racingx)|(advance|racingx)/i for use in: preg_match ($reg_expr, $file); however the expression above doesnot yeild the required result, it will match a string with any word, whereas i want to match strings with BOTH words present. example of the contents of $file that might pass is: advance_racingx_14_4_29.pdf another might be, which would not pass is: advance_fork10_3_4_11.pdf Thanks in advance for your help... Brian...

« previous php.general (#100077) next »