javascript - How to extract a JS variable using scan or match function in ruby? -


i content (source) of webpage using faraday in ruby. want extract js variable in source code obtained faraday. js variable written :

argtab["labelexample"] = "thethingiwant"; 

i want in ruby (framework rails).

how this:

/\w+\[\"\w+\"\]\s\=\s\"(\w+)\"\;/.match(f)[1] 

where f source string? it's important note escapes double quotes, improved allow single or double quotes.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -