Hello my guru friends,
I've been bouncing around the forum and the php manual for knowledge about this. While I did learn a bit more, I still have not quite resolved my issue.
$haystack = GB_PrintUnit($vUnit);
// $haystack would return something like:
// Mardigator<br>alligator_mardigator (animal)<br>Size: 2x2, Mastery:
// or
// African Tulip Tree<br>africantulip (tree)<br>Size: x, Mastery: *
// or
// Holiday Alpaca<br>alpaca_holiday (animal)<br>Size: 2x2, Mastery:
if ( preg_match('/***/', $haystack) ) {
fwrite($fh2, $haystack);
}
What I am trying to accomplish is to write $haystack to a text file for every string that has the Mastery: ***.
I just can't seen to get the regexp format right. Some entries may have one or two . Only the ones that have three in the string I want to have written.
Thought perhaps someone could give me an example. I've played around a bit with using special characters but just can't get it right.