Hi,
I need to extract a portion of a string using a given pattern.
The text I want is sandwitched between boundaries.
Here is an example string:
$text = "title one-==-##-==-Community Educator-=-#-=-title one ends, two begins-==-##-==-Laboratory Assistant-=-#-=-two ends";
You will notice that there is a repeating pattern:
-==-##-==-
-=-#-=-
How can I get the text between the two patterns?
In this case, I need to extract:
Community Educator
Laboratory Assistant
I tried this without success:
ereg("(-==-##-==-)[.]+(-=-#-=-)$", $text, $outputArray);
TIA,
Richie.