regex - Reg Ex for the following data -


i have xml data field

<some info></some info><some info2></some info2><description><lot of info></description><some more info></some more info><description><info></description> 

i want regex remove <description>anything</description> "description" tags. (there may arbitrary number of them)

i have put character pattern filter in solr schema.

you might people tell either:

  1. you can't parse xml regex.
  2. you should use dom library.

however, if want remove things between <description> tags should simple search <description>.*?</description> , replace nothing.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -