Regular Expression and Useage



I'm somewhat new to regular expression and want to know how to extract
any strings which match an IP address.

I found this on the net and wanted to know if this is the most
efficient (easiest/shortest) way to write the expression or pattern to
match. Also in the discovered solution why do they use the \b word
boundary switch since the characters are of a numeric type ? I'm not
sure about this.

\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b

Many thanks in advance.

Victor

.


Quantcast