your regex doesn't make a lot of sense. The pipe character |
is an "or", so you've specified two alternative patterns. You also seem to have forgotten to escape the brackets in the [*]
expression. Without escaping, this expression is a character class matching a single *
All in all, what your regex does is look for $this->row[...]
I also don't understand your use of parenthesis (which capture submatches).
OK, so you want a $this->row[...]
expression followed by an optional [*]
, right? Then you want the ?
quantifier, which denotes an optional expression:
Which means: $this->row[...]
optionally followed by an [*]