regex - Regexp::Assemble and Infinite loop -


I have the following code that can tell how the code enters an infinite loop and how I get the matching pattern I can do

  My $ dis = (ff = & gt; 'dfsdf2' yy = & gt; 'xx'); My $ ra = Regexp :: Integ-gt; New-> (1) - & gt; Add (keys% d); My $ data = 'blah blah ff dfsf y' '; While ($ ra-> match ($ data)) {my $ res = $ ra-> Milan; Print $ res; }  

i v5.18.0 strawberries and updated Regexp :: assemble

< P> Regexp :: There is no underlying support for repetition in this way. You have to:

  use 5.010; My $ re = $ ra- & gt; Again; While ($ data = ~ / $ re / g) {my $ res = $ ra-> Source ($ ^ R); Print $ res; }  

Comments