I have this code, and I need to add a regex ahead of "href=" for integers:
f = File.open("us.html")
doc = Nokogiri::HTML(f)
ans = doc.css('a[href=]')
puts doc
I tried doing:
ans = doc.css('a[href=\d]
or:
ans = doc.css('a[href="\d"])
but it doesn't work. Can anyone suggest a workaround?