I've been trying to figure this out for 2 hours now with no success. Its a bit complicated for me i guess. I am trying to parse a script file in PHP and return some values to the user. The ones i want are like this:
_value = object runFunction blah blah blah
Basically what i want is (in an algorithm):
- IF case-insensitive runFunction is found in the line (because it might be runfunction)
- AND the line starts with _ (underscore) (or if possible before the = there is a value that starts with _ to be sure of the result)
- THEN return that underscore value before the = to me.
Usually 99.9% the format is like this...But there are small cases it can be like this:
_value = _object runFunction blah blah blah (in case the _ after the = messes things up).
Any help here :) ? Thanks