Closed
Bug 410281
Opened 18 years ago
Closed 14 years ago
a Regex pattern is reported as syntax error by Rhino
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: emichaelb, Assigned: norrisboyd)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier:
patt=/((ftp:\/\/|http:\/\/|https:\/\/|ftp:\/\/www\.|http:\/\/www\.|https:\/\/www\.|www\.)(([A-Za-z0-9$_.+!*(),;/?:@&~=-])|%[A-Fa-f0-9]{2}){2,}(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*(),;/?:@&~=%-]*))?([A-Za-z0-9$_+!*();/?:~-]))/gi;
}}}
When Peller at Dojo entered my regex pattern shown above (which matches urls and works nicely in javascript) in plain Rhino (including the latest release) it comes back with a syntax error on the "~" near the end.
Reproducible: Always
Steps to Reproduce:
1. I found this using Shrinksafe online, which outputs "null" with any script containing this line of code.
2. Peller at Dojo entered in "plain Rhino", but I know nothing about how that is done.
3.
Actual Results:
"a syntax error on the "~" near the end."
| Assignee | ||
Updated•17 years ago
|
Assignee: nobody → norrisboyd
| Assignee | ||
Updated•17 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 1•14 years ago
|
||
The pattern works in all recent versions of Rhino I've tried it with (including 1.7R3 and current git).
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•