Overview
| Artifact ID: | b392a22a3e8dc7e6d9f1c248127e04c7f8c78de8 |
|---|---|
| Ticket: | 1513763fffffffffffffffffffffffffffffffff
The result of regexp is abnormal |
| User & Date: | dkf on 2006-06-28 15:45:47 |
Changes
- closedate changed to: "2006-06-28T08:45:47"
- closer changed to: "dkf"
- 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. - login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Works For Me"
- status changed to: "Pending"
- username: "dkf"