Project

General

Profile

Actions

Bug #12103

closed

ruby process hangs while executing regular expression.

Added by antonyr (Antony Raj) about 8 years ago. Updated about 8 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15], jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d Java HotSpot(TM) 64-Bit Server VM 24.45-b08 on 1.7.0_45-b18 +jit [darwin-x86_64]
[ruby-core:73948]

Description

The following code hangs

regex = /(\((\w+([\p{Punct}\s]{,3}\w*)*)\))/i
detail = "(said companies being fictitous sellers"
detail =~ regex

However when I change {,3} to {1,3}, the code executes and moves on. Otherwise hangs

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0