2013-10-17 57 views

回答

0

试试这个正则表达式:

regex = /image: (.+) \|product: (.+)/ 
result = regex.match("|image: http://product_image.png |product: http://product_url.html") 
puts result[1] # http://product_image.png 
puts result[2] # http://product_url.html 
相关问题