Here is what i am trying to do:
I have a paragraph of text that I am parsing through looking for specified key words or phrases. The keywords/phrases are contained in an array that I loop through and the keyphrase could be written two ways:
Some: Title or Some Title
Without breaking the keyphrase (becuase it is stored in a variable) before i search the paragraph, how can I, within the same regular expression, do the following
if the keyword is Some: Title, match anything in the paragraph that is either Some Title, or Some: Title
i am useing preg_replace
I have a paragraph of text that I am parsing through looking for specified key words or phrases. The keywords/phrases are contained in an array that I loop through and the keyphrase could be written two ways:
Some: Title or Some Title
Without breaking the keyphrase (becuase it is stored in a variable) before i search the paragraph, how can I, within the same regular expression, do the following
if the keyword is Some: Title, match anything in the paragraph that is either Some Title, or Some: Title
i am useing preg_replace
Comment