Im using curl to send a POST request in debian linux terminal and its working properly, This is the curl command:
curl --data "ping=8.8.8.8" -s http://www.ipvoid.com/ping/
Now i want to capture the content between the <textarea> tags by executing this command:
curl --data "ping=8.8.8.8" -s http://www.ipvoid.com/ping/ | grep -ioE '<textarea.*>(.*(\n.*)*)<\/textarea>'
But it returns nothing. I tested the regex and it works properly:
Is the problem with the regex or grep syntax?
grepparses input line by line.perl -0 -ne 'print for /<textarea.*>([\s\S]*?)<\/textarea>/gi'(Your regex works too, if you make the inner group non-capturing ((?:))grep -Pzo "<textarea.*>(.*(\n.*)*)<\/textarea>"but <textarea> tag still existperl