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

C8cd1fa732e4f52d53f051c54ad48812?d=identicon&s=25 Sunny DH (sd86)
on 2013-09-19 19:38
Hi,

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

Thanks,
Sunny
6e366eb5a71be2bad7f383d42aeb4788?d=identicon&s=25 Justin Collins (Guest)
on 2013-09-19 19:48
(Received via mailing list)
On 09/19/2013 10:38 AM, Sunny DH wrote:
> Hi,
>
> I'm starting to learn Ruby and wondering if Python's Regex group (?:)
> 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#lab...
C8cd1fa732e4f52d53f051c54ad48812?d=identicon&s=25 Sunny DH (sd86)
on 2013-09-19 20:00
Thanks Justin! I found what I needed.
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (robert_k78)
on 2013-09-20 09:57
(Received via mailing list)
On Thu, Sep 19, 2013 at 7:47 PM, Justin Collins <justincollins@ucla.edu>
wrote:
> On 09/19/2013 10:38 AM, Sunny DH wrote:

>> I'm starting to learn Ruby and wondering if Python's Regex group (?:)
>> 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
5b972395a92333843018b4add8af0437?d=identicon&s=25 Damián M. González (igorjorobus)
on 2013-09-21 16:10
Perhaps this site can help you:

 http://rubular.com/
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.