How to replace all keywords in a search string with specific string

时间:2019-05-31 11:36:41

标签: php

I have search string like this

(java AND j2ee) OR ("java developer" AND web 1.0)

I want to replace the above string like below

(skill:(java) AND skill:(j2ee)) OR (skill:("java developer") AND skill:(web 1.0))

For each skill I have to enquote in skill:().

I tried using str_getcsv and str_replace() but getting issues while having spaces and splitting at str_getcsv. Please Help me

0 个答案:

没有答案