Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: a regular expression question

by roboticus (Chancellor)
on Dec 18, 2012 at 15:41 UTC ( #1009408=note: print w/ replies, xml ) Need Help??


in reply to Re^2: a regular expression question
in thread a regular expression question

brassbin:

As toolic mentioned, the .* construct is greedy and tries to get the longest match. If you turn it into .*?, it then looks for the shortest match. If you read the link he provided, you could verify that yourself.

...roboticus

When your only tool is a hammer, all problems look like your thumb.


Comment on Re^3: a regular expression question
Replies are listed 'Best First'.
Re^4: a regular expression question
by brassbin (Novice) on Dec 18, 2012 at 17:07 UTC
    Thank you toolic, roboticus!
Reaped: Re^4: a regular expression question
by NodeReaper (Curate) on Dec 18, 2012 at 22:36 UTC
Re^4: a regular expression question
by brassbin (Novice) on Jan 29, 2013 at 14:29 UTC

    i haven't figured out all the rules yet of posting, but i meant to say thank you for your help

Re^4: a regular expression question
by brassbin (Novice) on Dec 18, 2012 at 22:39 UTC

    i don't know why a line that contains the words

    thank you

    doesn't show up

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2015-07-08 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls