That is weird, i apologize, for some reason it won't put the :alpha: in the php function code.. it keeps taking it out. so in the [[]] there should be a :alpha:.
the preg match was working fine before I put it into the class and tried to use it there. I am trying to figure out if there is something that prevents the preg_match() from working in classes... or where that error is coming from.
The syntax highlighter (or somewhere between) removes them. Not sure why, don't have the energy to figure it out. It's better to avoid the POSIX forms anyways.
The pattern shouldn't have ever worked. As it stands it will consider the leading "[" as the delimiter.
The reason it worked is that bracket-type delimiters work in opening/closing pairs unlike other characters:
The expression should be enclosed in the delimiters, a forward slash (/), for example. Any character can be used for delimiter as long as it's not alphanumeric or backslash (\). If the delimiter character has to be used in the expression itself, it needs to be escaped by backslash. Since PHP 4.0.4, you can also use Perl-style (), {}, [], and <> matching delimiters.
I personally like the ~tilde~ character, it makes more easily read patterns, quite unlike /slash/ which sometimes makes beautiful ascii art if you escape a lot, but is not very /\"readable\"/ as code