Could you point me out a PCRE RegEx that would match only the first letter of a string. I need to pass to Mongo DB, I'm concerning about performances at the moment I'm using ^a
.
Examples:
MATCH
apple
alligator
NO MATCH
thanks
there are special tokens in PCRE to represent beginning and end of a string
/^a/ => will match all strings that start with "a"