Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^5: Regex problem - (non)greedy?

by hdb (Monsignor)
on Nov 14, 2013 at 14:40 UTC ( [id://1062598]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Regex problem - (non)greedy?
in thread Regex problem - (non)greedy?

The first one does not match as the OP contains two spaces at least between 'cd' and 'ghi'.

Also what would he expect for 'cd cd ghi'?

Replies are listed 'Best First'.
Re^6: Regex problem - (non)greedy?
by ikegami (Patriarch) on Nov 14, 2013 at 14:44 UTC
    He clearly doesn't want the middle "cd" as that's his question.

      But he says the 'EF' would be a random text, so it could be 'cd' as well?

      And what about 'cd accd ghi'?

        But he says the 'EF' would be a random text, so it could be 'cd' as well?

        That makes no sense. cd is part of his pattern.

        And what about 'cd accd ghi'?

        Not sure, though it's just a question of using or not using \b.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-19 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found