allowing inner slashes in regexes

This commit is contained in:
Jeremy Ashkenas 2009-12-17 08:29:19 -05:00
parent 4e1e119f58
commit 1a8311b9d0
2 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,8 @@ spaced_out_multiline_object: {
list: [1, 2, 3, 4]
regex: /match[ing](every|thing|\/)/gi
three: new Idea()
inner_obj: {

View File

@ -18,7 +18,7 @@ class Lexer
NEWLINE = /\A([\r\n]+)/
COMMENT = /\A(#[^\r\n]*)/
CODE = /\A(=>)/
REGEX = /\A(\/(.*?)\/[imgy]{0,4})/
REGEX = /\A(\/(.*?)[^\\]\/[imgy]{0,4})/
JS_CLEANER = /(\A`|`\Z)/
MULTILINER = /[\r\n]/