Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ar = "m 408.86621,382.18531 c -60.47705,2.3e-4 -60.47705,2.3e-4 -102.37687,6.91573 -125.69958,20.74653 -23.32304,13.83122 -34.98448,37.42529 s-34.98435,70.78229 M-1.3e-4,26.57737"
- re = /
- ([m|M|c|C|s|S|q|Q]) |
- ([-+]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][-+]?[0-9]+)?)\s*\,\s*
- ([-+]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][-+]?[0-9]+)?)
- /
- ar.scan( re ).each { |a1 , a2 , a3, a4, a5, a6, a7, a8, a9 |
- if a != nil then
- puts "str>#{a1.to_f}"
- else
- puts " =>#{a2.to_f} #{a6.to_f}"
- end
- }
Add Comment
Please, Sign In to add comment