Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1d1bfdbf18f999259192e2acf4212de76ae06a31
Ticket: 3604074fffffffffffffffffffffffffffffffff
Inifinite loop when matching regular expression
User & Date: bjorngrathwohl on 2013-02-11 11:04:01
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    When I perform a match with five or more nested kleene stars, like the regular expression (((((a)*)*)*)*)* on the input string "a", Tcl goes into an infinite loop.  When there are four or fewer kleene-stars, it does not happen.
    If I change the expressions to use non-grouping parentheses, like (?:(?:(?:(?:(?:a)*)*)*)*)*, the problem disappears.
    
    % set exp "(((((a)*)*)*)*)*"
    (((((a)*)*)*)*)*
    % [regex $exp "a"]
    <LOOP>
    
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "bjorngrathwohl"
  10. subsystem changed to: "None"
  11. title changed to: "Inifinite loop when matching regular expression"
  12. type changed to: "Bug"