Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Problem with Regex

by delirium (Chaplain)
on Aug 02, 2011 at 16:31 UTC ( [id://918098]=note: print w/replies, xml ) Need Help??


in reply to Problem with Regex

I've found range operators pretty helpful when looking for text between XML tags. A variation on something like this might work:
perl -e '$tag = "text"; while(<>) {print if(/<$tag/ .. m!</$tag!)}' fi +le.txt
Output:
<text xml:space="preserve">some Text ... ......... ..................... ..................... .....................</text>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://918098]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2025-12-14 17:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (94 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.