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

I am not sure what the expected results are, but the actual results are:

cdghi: (no match) cd ghi ghi: ghi cd abc ghi cd def ghi: def

Replies are listed 'Best First'.
Re^4: Regex problem - (non)greedy?
by ikegami (Patriarch) on Nov 14, 2013 at 14:38 UTC
    I expect he'd want "" for the first and "" for the second. As for the third, see my update.

      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'?

        He clearly doesn't want the middle "cd" as that's his question.