RegExp question: look-behinds?

D

Dave Sims

Is there any way to express a non-consuming look-behind in a Ruby
RegExp? The (?<!<pattern>) operator seems to be unsupported.

Dave
 
W

Wolfgang Nádasi-Donner

--
Wolfgang Nádasi-Donner
(e-mail address removed)
Dave Sims said:
Is there any way to express a non-consuming look-behind in a Ruby
RegExp? The (?<!<pattern>) operator seems to be unsupported.

Dave
It is supported starting Ruby 1.9, which uses Onigurama as Patter Matching Engine. Actually there is no
support for look-behind patterns in Ruby.

Best regards, Wolfgang
 
J

Jacob Fugal

It is supported starting Ruby 1.9, which uses Onigurama as Patter Matchin= g
Engine. Actually there is no support for look-behind patterns in Ruby.

Just as a clarification[1] for English speakers, the use of the word
"Actually" above is not contradictory. Many English idioms use the
word "actually" to denote the reality of a situation as opposed to a
desired or imagined situation. But as used here it means the /current/
reality as opposed to some future reality. You can read the sentence
above as "[Currently] there is not support...", but there *will* be
support in 1.9.

For the non-native English speakers, it is often best to reserve the
word "actually" for contrast against hypothetical situations and the
word "currently" for contrast against past of future situations.

Jacob Fugal

[1] This post is *NOT* a flame nor a correction of Wolfgang's English.
I don't want the whole newsgroup/list pretending they're native
English speakers. I like the diversity. I just wanted to make sure
there wasn't any confusion... primarily since I was confused myself
for the few seconds before my rusty spanish grammar kicked in. :)
 
W

Wolfgang Nádasi-Donner

snip >>>>>
....
Just as a clarification[1] for English speakers, the use of the word
"Actually" above is not contradictory. ...
Oh, a typical wrong usage for a german native speaker (a false friend). Same as "my point of view" which is
very unusual for native english people, but will be used often by german speakers.

Sorry for possible wrong interpretations.

Best regards, Wolfgang
 

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
474,176
Messages
2,570,950
Members
47,500
Latest member
ArianneJsb

Latest Threads

Top