On Monday, 25 May 2015 at 11:20:46 UTC, novice2 wrote:
I cannot get the longest possible
it match longest for first group ([a-z]+)

try

^([a-z]+?)(hula|ula)$

Namespace, novice2:

Ah, I see. The problem was with the first group that was too greedy, not with the second. I was focusing on the latter. Thanks, this works now!
  • Regex-Fu Chris via Digitalmars-d-learn
    • Re: Regex-Fu Namespace via Digitalmars-d-learn
    • Re: Regex-Fu novice2 via Digitalmars-d-learn
      • Re: Regex-Fu Chris via Digitalmars-d-learn

Reply via email to