Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Help!! Regular Expressions

by bjelli (Pilgrim)
on Apr 12, 2001 at 14:13 UTC ( #72006=note: print w/replies, xml ) Need Help??

in reply to Regular expression to match text between two tags (was: Help!! Regular Expressions)

another solution, without regular expressions. I assumed that you're reading from a file, and that you want to read in more the one lump of data:

#!/usr/bin/perl -w use strict; { local $/ = ":::"; # read stuff separated by ::: while(<DATA>) { s/:::$//; # remove the ::: at the end of # each lump of data print "found a piece -->$_<--\n\n"; } } __DATA__ Some foo:::This is a some text. It talks about CGI::Carp, but then suddenly changes subject to matching three :'s in a row ::: The server asked you what permission you had to tell it what to do on it's day off. This was your day.::: More foo.

hope that helps

Brigitte    'I never met a chocolate I didnt like'    Jellinek

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://72006]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2018-02-17 19:14 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (249 votes). Check out past polls.