zero-width positive "look-behind"?

N

Nathan

Ah (?<=3Da)ttt is what I was after. Thanks for the link.

"tttttattttt".match(/ttt(?=3Da)/) #http://rubular.com/r/21Zo6JP09f =3D> ["ttt"]
"tttttattttt".match(/(?=3Da)ttt/) #http://rubular.com/r/d1VSUwwZUu
=3D> nil
Why? And how can I get this effect?

It seems you have just demonstrated how to get the effect you described.

For more info:

http://www.geocities.jp/kosako3/oniguruma/doc/RE.txt

Note: you need Ruby 1.9.

Kind regards

=A0 =A0 =A0 =A0 robert
ractices.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top