I need to extract a project number out of a string. If the project number was fixed it would have been easy, however it can be either P.XXXXX
, P XXXXX
or PXXXXX
.
Is there a simple function like preg_match
that I could use? If so, what would my regular expression be?