in reply to Re^2: how to find what's not there with a regex?
in thread how to find what's not there with a regex?

How do I say 'anything including spaces up to the first occurrence of more than one space in a row'?
A literal translation (untested) would be /(?>.*?(?=  ))/s.

Replies are listed 'Best First'.
Re^4: how to find what's not there with a regex?
by ikegami (Patriarch) on Aug 24, 2005 at 14:54 UTC
    Here's an alternative, in case yours doesn't work:
    # Read these comments from the bottom up. / ( (?: (?! \s{2} ) # which aren't the start of 2 spaces. . # characters )* # zero or more ) # Capture /sx