I want to extract all the word that occurs between 'ob'
and ','
, i.e.,
from the string
' QS=TCE,Ob=Web technology,OB=Product SPe,OB=Dev profile,OB=Computer Management,oB=Hardware Services,cd=sti,CD=com,cd=ws'
I want the following results:
Web technology,Product SPe,Dev profile,Computer Management,Hardware Services
What I tried is this:
preg_match_all("!\OB=(\w+)\,!", ' QS=TCE,Ob=Web technology,OB=Product SPe,OB=Dev profile,OB=Computer Management,oB=Hardware Services,cd=sti,CD=com,cd=ws', $matches);
print_r($matches);
But it does not give any result. What is wrong in this?