Does Python Regex group symbol ( ?: ) work in Ruby?

Hi,

I’m starting to learn Ruby and wondering if Python’s Regex group (?:slight_smile:
symbol works in Ruby.
From my experiments it seems like it does, but I’d like a conclusive
answer.

Thanks,
Sunny

On 09/19/2013 10:38 AM, Sunny DH wrote:

Hi,

I’m starting to learn Ruby and wondering if Python’s Regex group (?:slight_smile:
symbol works in Ruby.
From my experiments it seems like it does, but I’d like a conclusive
answer.

Thanks,
Sunny

http://www.ruby-doc.org/core-2.0.0/Regexp.html#label-Grouping

Thanks Justin! I found what I needed.

Perhaps this site can help you:

http://rubular.com/

On Thu, Sep 19, 2013 at 7:47 PM, Justin C. [email protected]
wrote:

On 09/19/2013 10:38 AM, Sunny DH wrote:

I’m starting to learn Ruby and wondering if Python’s Regex group (?:slight_smile:
symbol works in Ruby.

That is not particular to Python. The proper term would be “non
capturing group”.

From my experiments it seems like it does, but I’d like a conclusive
answer.

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

Kind regards

robert

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs