I'm trying to retrieve the first couple of capital letters from a string in PHP, but I'm not sure if there's a specific function to do this. Should I perhaps resort to using regex? If so, how?
Here's an example of what should be returned (INPUT => OUTPUT):
ABCD => ABCD
Abcd => A
ABcd => AB
aBCD => empty string ""
abcd => empty string ""
Any help would be appreciated :)
-Chris