Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

Re: help with regex pattern

  •  04-08-2010, 5:00 PM

    Re: help with regex pattern

    Well first the last two characters of the pattern you've posted say match any characters (except newline) from 0 to infinity so any string that starts with your allowed characters will pass

    If you meant to test the whether the entire input you need to put the boundary anchors on each end of the string

    psuedo regex

    ^(your pattern)$

     The other error is the placement of the hyphen character, where you are actually are trying to match that character.  As written that character isn't being matched another one is.

    http://regexadvice.com/blogs/mash/archive/2004/06/17/310.aspx


    Michael

    "In theory, theory and practice are the same. In practice, they are not."
    Albert Einstein
View Complete Thread