|User: editor -- 2008-05-24 << 151 153 >>|
|Type: Advanced search and replace|
|Search all Advanced search and replace examples|
|Can I translate all the IP address to country in a text file? |
|This is ip address 126.96.36.199 |
The second ip address is 188.8.131.52
|This is ip address 184.108.40.206( Japan ) |
The second ip address is 220.127.116.11( Australia )
|Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.|
|1. ctrl-o open source file |
2. ctrl-h open 'Replace' dialog
in 'Replace' page,
* set 'Search for Pattern' to:
* set 'Replace with Pattern' to:
3. click 'Replace', ok!
Note: \d+\.\d+\.\d+\.\d+ is regular expression, stands for ip address.
ip2country($match) means change matched ip address to country name.
P.S. To avoid inputing above text manually, you can also use menu "Replace->Replace by Template->Misc->Convert IP Address to Country Name" menu directly.
|Download Script: scripts/152.rst.zip|
Screenshot 1: Replace_Window
|How to extract all IP address from a text file? (74%)|
How to extract all html address from a text file? (68%)
How to extract all email addresses from many text files? (67%)
How to add a port 80 for all IP addresses in a text file? (64%)
How to reverse all cases of letters in a text file? (63%)
How to sort all lines of ip addresses in a text file? (61%)
Can I download by all url addresses which are listed in a text file? (61%)
How to extract all odd columns 1,3,5,... from a text file? (60%)
Check Demo of Advanced search and replace
|ddd translate convert ip address odd trans ip address template dir convert address replace translate search for ip address in text file ip address search and replace ip and address ip address replace regular expression for replace in text to regular expression search expression|