regex - Find & replace multiple keywords defined string -


i'm trying remove following string/line in sql database:

<p><span style="font-size:16px"><strong>the quick brown &nbsp;</strong></span><strong><span style="font-size:16px">fox jumps.</span></strong></p> 
  1. string start <p> , end </p>
  2. string contain these words, in same order: the, quick, brown. might separated else (space, &nbsp; or other html tags)
  3. string part of field more text, nested html tags, solution must ignore higher level <p></p> tags.
  4. we talking +20k matches, no manual edits solutions please :)

i have tried doing regexp can't filter multiple keywords (and operator).

i can export db sql file can use solution recommend, windows/linux, text editor, js script etc. appreciate simplest , elegant solution.

i think have restrict .* non-efficient more precise (?:(?!<\/?p[^<]*>).)* force match words inside 1 <p> tag:

(?i)<p>(?:(?!<\/?p[^<]*>).)*the(?:(?!<\/?p[^<]*>).)*?quick(?:(?!<\/?p[^<]*>).)*?brown(?:(?!<\/?p[^<]*>).)*?<\/p> 

see demo


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -