ip address - Finding hard-coded IP addresses using Visual Studio 2010 'Find in Files' utility (Ctrl+Shift+F) -


i need find hard-coded ip addresses in of our visual studio 2010 solutions.

how using standard 'find' utility (ctrl+shift+f) visual studio 2010?

unfortunately regex search in visual studio 2010's "find in files" functionality not perl5-compatible. regex pattern match numbers specified in x.x.x.x style (ie. ipv4-style address):

[0-9]#\.[0-9]#\.[0-9]#\.[0-9]# 

according the documentation, doesn't there's way specify pattern must repeated between 1 , 3 times want ipv4-style octets, above pattern match version numbers 2.0.20505.0.

you can, however, limit number of digits in octets 3 specifying them explicitly separate groups, although gets verbose:

([0-9]|([0-9][0-9])|([0-9][0-9][0-9]))\.([0-9]|([0-9][0-9])|([0-9][0-9][0-9]))\.([0-9]|([0-9][0-9])|([0-9][0-9][0-9]))\.([0-9]|([0-9][0-9])|([0-9][0-9][0-9])) 

this still match version numbers 3 or fewer digits per "section" of version, 4.0.0.0, match ipv4 addresses 11.2.123.21.

the format writing ipv6 addresses more flexible ipv4 , while it's possible match them visual studio 2010 regex, horribly complicated. :-)


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -