• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

regex between boundary tags

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a text file captured from a PL/SQL query. It contains 482 XML documents with identical structures. I'd like to merge these into a single document. The root element tag of each document is "<ROWSET>". I'm looking for a regular expression that will match "<ROWSET>[any number of characters here]</ROWSET>". The expression should match each of the 482 documents and not grab all the text between the opening <ROWSET> of the first document and closing </ROWSET> of the 482nd document.

Reading and muddling has not so far produced the results I want, so I'm asking for your help.

Thanks.
 
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The simple answer is: If the documents are very large, you might find that regex to be too slow. Here's a faster version:
 
I've read about this kind of thing at the checkout counter. That's where I met this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic