Closed ammar closed 14 years ago
According to RE.txt in Oniguruma, \Q and \E are only available for ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA. \Q appears in Escapes table (src/regexps.xml#L384)
Simple test seems to confirm:
>> RUBY_DESCRIPTION => "ruby 1.9.2p0 (2010-08-18 revision 29036) [i386-darwin9.8.0]" >> "a.c" =~ /a\Q.c/ => nil >> "aQ.c" =~ /a\Q.c/ => 0 >> "aQbc" =~ /a\Q.c/ => 0
If I'm mistaken, then closing \E is missing in documentation.
Thanks.
Regexps: Ruby doesn't support \Q escape. Closed by 2a93bac7848118b3d66c03dd82523e88a9247dfa.
According to RE.txt in Oniguruma, \Q and \E are only available for ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA. \Q appears in Escapes table (src/regexps.xml#L384)
Simple test seems to confirm:
If I'm mistaken, then closing \E is missing in documentation.
Thanks.