in reply to transfer form vbs to perl
I don't know exactly how regular expressions operate in VBS, but here's my take:
$ perl -nle 'print for /(?:\d{1,3}\.){3}\d{1,3}:\d{1,4}/g' file.txt >o +utput.txt
If you want to learn to write your own script, the pages perlintro and perlretut will give you everything you need to know for this task.
Update: It seems you've now posted your sample input and output data as a root node here. Next time, please put everything into one post, and try writing some code first, since nodes that show more effort usually tend to get better and faster replies. See also How do I post a question effectively?
|
|---|