Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b392a22a3e8dc7e6d9f1c248127e04c7f8c78de8
Ticket: 1513763fffffffffffffffffffffffffffffffff
The result of regexp is abnormal
User & Date: dkf on 2006-06-28 15:45:47
Changes

  1. closedate changed to: "2006-06-28T08:45:47"
  2. closer changed to: "dkf"
  3. icomment:
    Logged In: YES 
    user_id=79902
    
    I've no idea what the above regular expression is trying to
    achieve, since it will match any non-empty sequence of 'o'
    characters (the * allows bits to be ignored). However, if I use:
       ^(oo+?)\1+$
    as the RE (dropping one set of parens for simplicity and
    changing to using a +) then I get a perfectly adequate
    non-prime detector.
       % info patch
       8.4.7
       % #Print the lowest prime factor of 169...
       % string length [lindex [regexp -inline {^(oo+?)\1+$}
    [string repeat o 169]] 1]
       13
    
    Looks like pilot error to me.
    
    
  4. login: "dkf"
  5. mimetype: "text/plain"
  6. resolution changed to: "Works For Me"
  7. status changed to: "Pending"
  8. username: "dkf"