Commit 1ea13483 authored by Kouki Ooyatsu's avatar Kouki Ooyatsu

Regexp: %r notation bug fix. close #85.

be able to parse any delimiters.
variable expansion isn't supported yet.

 * sample code
```
def matchpath(str)
  puts "#{str} is ..."

  if %r!img/! =~ str then
    puts "match"
  else
    puts "not match"
  end
end

matchpath("img/a.png") # => match
matchpath("/usr/local/bin") # => not match
matchpath("book/img/local") # => match
```
parent fbe04176
......@@ -4440,7 +4440,7 @@ parser_yylex(parser_state *p)
p->lex_strterm = new_strterm(p, str_regexp, term, paren);
#endif
p->regexp = 1;
p->sterm = '/';
p->sterm = term;
return tREGEXP_BEG;
case 's':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment