Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 35bdf3924836d110117106e43a17523cddb283b9
Ticket: 05beaa6eef4fdb97d6fb518f0508c108c010c548
regexp fails to match braces inside a character class
User & Date: ericp on 2014-02-15 01:54:00
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/html"
  4. comment changed to:
    <p>I want to match a set of characters including letters,
    spaces, brackets and braces between two words:
    
    <pre>
    % set ptn {the ([\w\{\}\[\]\s]+) test}
    the ([\w\{\}\[\]\s]+) test
    
    # Words and spaces match
    % regexp -inline $ptn {the abc def test}
    {the abc def test} {abc def}
    
    # Words and square brackets match
    % regexp -inline $ptn {the abc][def test}
    {the abc][def test} {abc][def}
    
    # Even a single square bracket will match
    % regexp -inline $ptn {the [ test}
    {the [ test} {[}
    
    # But tcl fails to match braces:
    % regexp -inline $ptn {the abc\}\{def test}
    % regexp -inline $ptn {the abc\{def test}
    % regexp -inline $ptn {the \{ test}
    </pre>
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "ericp"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "6d1053e9208f1074fd485c15cc0d7e49e190bac5"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "ericp"
  14. subsystem changed to: "43. Regexp"
  15. title changed to:
    regexp fails to match braces inside a character class
    
  16. type changed to: "Bug"