Matching multiples

eruccecouptq

New Member
I need to match the following using preg_match()\[code\]cats and dogscatsAndDogsi like cats and dogs\[/code\]etc, so i simply stripped out the spaces and lowercased it and used that as my pattern in preg_match();\[code\]'/catsanddogs/i'\[/code\]But now I need to match the following too:\[code\]cats+and+dogscats_and_dogscats+and_Dogs\[/code\]So is there quick and easy way to do a string replace multiple times, other than nesting it? I want to end up with the same pattern to match with.Thanks.
 
Back
Top