Okay I have:
preg_match("/hello (.+) goodbye/sU", $text_file, $matches);
I want to change hello to $start and goodbye to $end
What do I do?
preg_match("/$start (.+) $end/sU", $text_file, $matches);
Does the above work?
You ask for help, and you havn't even tested it yet? Anyways....yes you can use variables in the expression, so your code should work. But the only change that might need done is adding \.
preg_match("/\\\$start (.+) $end/sU", $text_file, $matches);