Demo -- Ip to country conversion, etc.
Previous Topic  Next Topic 

Convert IP address to Country Name

Example:

Translate IP address to country for each visiting records

Replace settings:

1) Replace unit=Chars

2) Search for pattern=\d+\.\d+\.\d+\.\d+

3) Replace with pattern=$match \( ip2country($match) \)

4) Note: you can also select menu Replace->Replace by template->Misc->Convert IP to Country Name


Expression Calculator

Example:

Calculate result of each line

Replace settings:

1) Replace unit=Line

2) Search for pattern=.*

3) Replace with pattern=$match = eval($match)\n

4) If=$match=~/^[\d\+\-\*\/\(\)\.\s]+$/

5) Note: you can also select menu Replace->Replace by template->Misc->Expression Calculator

Random Character Generator

Example:

Replace all characters to Random char

Replace settings:

1) Replace unit=Chars

2) Search for pattern=Search,[A-Za-z]

3) Replace with pattern=chr(ord('a')+int(rand(26)))

4) Note: you can also select menu Replace->Replace by template->Misc->Randoms: Replace all chars to random char