Nuwan
Nuwan

Reputation: 15

imacros cut a part of txt from extracted text

I have a website which gives the output as;

Host: 37.70.90.192
Port: 21
Username: sam
Password: dean

Domain: example.net
IP Address: 37.70.90.192
Package: basic

This is a plain text with no tags for individual entries. To extract the above I use

TAG POS=2 TYPE=DIV ATTR=TXT:CreatingAccountAccountInformation-------------------* EXTRACT=TXT

What I need to do is cut out everything except the ip address from this text. I don't know how to get the only that part of numbers. Hope you could help.

Thank you.

Upvotes: 0

Views: 468

Answers (1)

Shugar
Shugar

Reputation: 5299

This must help:

SET ip EVAL("'{{!EXTRACT}}'.match(/IP Address: (\\d+\\.\\d+\\.\\d+\\.\\d+)/)[1];")

Upvotes: 1

Related Questions