[#3006] mismatched quotation — "stevan apter" <apter@...>

ruby documentation uses a punctuation convention i've never seen

13 messages 2000/05/27

[ruby-talk:02891] Re: Confused about '/o' in regexps

From: ts <decoux@...>
Date: 2000-05-18 16:18:46 UTC
List: ruby-talk #2891
>>>>> "D" == Dave Thomas <Dave@thomases.com> writes:

D>   a = /ab#{c}d/;

D> should not evaluate the substitution immediately, but should instead
D> wait until I use the regexp object 'a'. Instead I get 'undefined
D> variable 'c''.

 Same than perl 

pigeon% ./perl -Dr -le '$a = qr(ab${c}d); print $a'
Omitting $` $& $' support.

EXECUTING...

Compiling REx `abd'
size 3 first at 1
rarest char b at 1
   1: EXACT <abd>(3)
   3: END(0)
anchored `abd' at 0 (checking anchored isall) minlen 3 
(?-xism:abd)
Freeing REx: `abd'
pigeon% 



Guy Decoux

In This Thread

Prev Next