Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 410b2a9902999646856a9c26e4f6dca38dc84bd3
Ticket: 11250a236da29e6badf7755a1b67995defa5170f
unexpected non greedy matching behaviour
User & Date: anonymous on 2015-05-17 18:38:35
Changes

  1. icomment:
    I see now after looking long and hard at `man re_syntax' that it somehow _is_ explained but making this more obvious would be good. it seems a solution in my case is to to use
    
    regexp -all  {\\(?:\w+){1,1}?{(.*?)}} $s dum
    
    this "trick" of appending `{1,1}?' to the greedy part in order to make it non-greedy overall (if it _is_ the way to solve this, might especially deserve to be pointed out more pronouncedly.
    
  2. login: "anonymous"
  3. mimetype: "text/plain"