Projects

Ticket #762 (closed defect: duplicate)

Opened 20 months ago

Last modified 14 months ago

Some regexp returns "compilation error: U_REGEX_RULE_SYNTAX".

Reported by: watson1978@… Owned by: lsansonetti@…
Priority: blocker Milestone:
Component: MacRuby Keywords:
Cc:

Description

I attach a UnitTest of Ruby 1.9.2 preview 3. Some regexp returns "compilation error" in this UnitTest.

$ macruby test_regexp.rb 
test_regexp.rb:76: regexp `&(?<foo>.*?);' compilation error: U_REGEX_RULE_SYNTAX
test_regexp.rb:84: regexp `&(?<foo>.*?);' compilation error: U_REGEX_RULE_SYNTAX
test_regexp.rb:87: regexp `&(?<foo>.*?); (y)' compilation error: U_REGEX_RULE_SYNTAX
test_regexp.rb:91: regexp `&(?<foo>.*?); (?<bar>y)' compilation error: U_REGEX_RULE_SYNTAX
test_regexp.rb:93: regexp `&(?<foo>.*?); (?<foo>y)' compilation error: U_REGEX_RULE_SYNTAX
test_regexp.rb:95: regexp `(?<id>[A-Za-z_]+)' compilation error: U_REGEX_RULE_SYNTAX
---- snip ----

Attachments

test_regexp.rb Download (29.3 KB) - added by watson1978@… 20 months ago.
envutil.rb Download (6.1 KB) - added by watson1978@… 20 months ago.

Change History

Changed 20 months ago by watson1978@…

Changed 20 months ago by watson1978@…

Changed 19 months ago by lsansonetti@…

Named captures are not yet supported. They used to work until we rewrote the RE layer using ICU. It is possible to make them work by pre-parsing the regexps during parsing phase and appropriately creating locals, but this may not happen for 0.7.

Changed 14 months ago by tglee@…

Changed 14 months ago by mattaimonetti@…

  • status changed from new to closed
  • resolution set to duplicate

Duplicate of #1018

Note: See TracTickets for help on using tickets.