Skip to content

Commit

Permalink
add support for IPv4 and IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
chn42 committed Sep 18, 2024
1 parent 7f0c823 commit 3d3e38e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions colourfiles/conf.whois
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ colours=yellow
regexp=(([\w\d]([\w\d-])+\.){1,})([\w\d-]{2,})
colours=green
=======
# IPv4
regexp=((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])
colours=green
=======
# IPv6
regexp=(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F ]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4 }:((:[0-9a-fA-F]{1,4}){1,6})|([0-9a-fA-F]{1,4}:){1,7}:|:((:[0-9a-fA-F]{1,4}){1,7}|:))
colours=green
=======
# url
regexp=http[s]?://(([\w\d]([\w\d-])+\.){1,})([\w\d-]{2,})(/[\w\d\S\s]*)*
colours=bold green
Expand Down

0 comments on commit 3d3e38e

Please sign in to comment.