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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -