This seems like such a simple thing, but it just isn't working for me... I have a series of regexes, and rather than writing them out each time, I wanted to store each one in a variable, and then insert it into the appriate spot in the code at runtime, but I just can't get it to work.
I've tried all kinds of variations, including:
preg_match("/" . $regex_string . "/i", $first_pt, $match)
But none works.
One clue might be the following: When I step through execution, and load my regex string, it seems to escape all my special characters (e.g., \s becomes \s).
Anyone have a clue what the problem is and/or how I can make this work?