Re: Regex Help



"inderpaul_s@xxxxxxxxx" <inderpaul_s@xxxxxxxxx> writes:

but reading on the \b means a word boundary but does it matter that I
want to find the pattern matching an IP address since the IP address
is made up of characters which are numeric and separated by a
decimal ?

\b is the zero width point between something which is a word character
(\w) and something which isn't (\W). Word characters is defined as
alphabetic characters (a-z, A-Z), decimal digits (0-9) and the
underscore character (_) (and depending on locale something more).

So the four numeric parts of an IP-address counts as words in relation
to \b.

//Makholm
.



Relevant Pages

  • Re: RegEx problem
    ... you don't actually want a word character. ... You have needlessly escaped characters that are not regex ... A regex should look like a regex. ... The anonymous subroutine in the map() is weird, unnecessary, and broken. ...
    (comp.lang.perl.misc)
  • Re: Help me understand use of regular expressions to validate data
    ... variable contains a string consisting only of alpha numeric characters. ... "word character". ... "use locale" is in effect, it includes whatever characters the locale ...
    (comp.lang.perl.misc)
  • Re: 128 bit password
    ... If a password is for example 128bit, how long is it in characters (a-z ... If the password is "THISisMYpassword". ... It's the level of coding the security ...
    (microsoft.public.security)
  • Re: Found this file I cant seem to delete
    ... bash scans each word for the characters *, ?, and [. ... Matches any single character. ... But he quoted it, which prevents pattern matching. ...
    (comp.unix.shell)
  • At my wits end: LIKE
    ... naming convention. ... I'm doing this using pattern matching in a LIKE ... Matching on the first four characters I get a match: ... What am I missing here? ...
    (comp.databases.ms-sqlserver)