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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

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

c# - Search and Add Comment with OpenXML for Word -