If I have a text, how can I get all the strings with a certain pattern from the text? For example I want all the strings with this patters:
The word
CER
followed byany number
followed by one of this characters;
,,
,.
orspace
.
For exemple from the text bellow I wold like to have in an array the following results : CER123 , CER23 , CER01 , CER24
Lorem CER123 ipsum dolor sit amet, quod copiosae CER23,CER01;CER24 insolens et usu, vis CER34ERD ut saperet civibus accommodare.
I've tried this:
preg_match_all("/CER[0-9*]?/",$content,$m);
but it returns : CER1
, CER2
, CER0
, CER2
and CER3