Get numbers from string
regex, ruby
Solution
Does this work?
`"1|2 3 4 oh 5 oh oh|e eewrewr|7|".split('|')[1].scan(/\d/)`
Problem
I got a string: ``` "1|2 3 4 oh 5 oh oh|e eewrewr|7|". ``` I want to get the digits between first pipes (|), returning "2 3 4 5". Can anyone help me with the regular expression to do that?