Answer the question
In order to leave comments, you need to log in
Why does the regular expression work "in reverse"?
There is a regular expression: https://regex101.com/r/ZLTSoK/4
Which for some reason unknown to me does not work in Ruby:
re = /(.*?)(?:\(|\/)(?:.*?)\n/
line = re.match(tmp) if re.match(tmp).present?
puts line
tmp
is the string to be parsed. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question