I’m not that skilled with regex (yet), so I don’t know if I could
extend the regex class with my own method. I’m not sure what all data
is available to me after parsing.
I’m not that skilled with regex (yet), so I don’t know if I could
extend the regex class with my own method. I’m not sure what all data
is available to me after parsing.
For “group names”, you can use this basic replacement idea:
[ 1,2,3,4 ].each do |exch|
[ “jones”,“smith” ].each do |party|
[ 303,404,505 ].each do |area|
array = data.scan(%r{regex
code(#{exch})(#{party})[regex
code]})
end
end
end
using this code and suitable data, “array” will contain:
I’m not that skilled with regex (yet), so I don’t know if I could
extend the regex class with my own method. I’m not sure what all data
is available to me after parsing.
dvn
With Ruby’s builtin regex engine? No. With Oniguruma (or the Ruby 1.9
branch)? Yes.