mirror of
https://github.com/robertkrimen/otto
synced 2025-10-26 20:28:49 +08:00
Add a few regular expression tests
This commit is contained in:
4
otto.go
4
otto.go
@@ -95,10 +95,12 @@ Regular Expression Syntax
|
||||
Go translates JavaScript-style regular expressions into something that is regexp package compatible.
|
||||
|
||||
Unfortunately, JavaScript has positive lookahead, negative lookahead, and backreferencing,
|
||||
all of which are not supported by Go's re2-like engine: https://code.google.com/p/re2/wiki/Syntax
|
||||
all of which are not supported by Go's RE2-like engine: https://code.google.com/p/re2/wiki/Syntax
|
||||
|
||||
A brief discussion of these limitations: "Regexp (?!re)" https://groups.google.com/forum/?fromgroups=#!topic/golang-nuts/7qgSDWPIh_E
|
||||
|
||||
More information about RE2: https://code.google.com/p/re2/
|
||||
|
||||
UTF-8 UTF-16
|
||||
|
||||
Internally, otto stores strings as Go does, which is UTF-8. JavaScript calls for strings to be handled as UTF-16.
|
||||
|
||||
Reference in New Issue
Block a user