Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: regular expressions query

by qq (Hermit)
on Jun 30, 2004 at 23:35 UTC ( [id://370941]=note: print w/replies, xml ) Need Help??


in reply to Re: regular expressions query
in thread regular expressions query

If you are matching across newlines, are you not reading line by line? If the data is in one big string, perhaps you want something more like:

#!/usr/bin/perl my $txt = ' none bing some bong any bang '; while ( $txt =~ /^ {9}(\S+) {10}(\S+)\s*$/mg ) { print "'$1' '$2'\n"; }

qq

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-18 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found