John,
The original as found in the sipx library which uses PCRE:

// UsernameAndPassword
//   requires and matches the trailing '@'
//   $1 matches user
//   $2 matches password
const RegEx UsernameAndPassword(
   "("
      "(?:"
         "[a-zA-Z0-9_.!~*'()&=+$,;?/-]++"
      "|"
         "%[0-9a-fA-F]{2}"
      ")+"
    ")"
   "(?:" ":"
        "("
        "(?:"
            "[a-zA-Z0-9_.!~*'()&=+$,-]++"
        "|"
           "%[0-9a-fA-F]{2}"
        ")*"
      ")"
    ")?"
    "@"
                                   );

This doesn't take in boost::regex.

-s7

On Mar 31, 2009, at 1:42 AM, John Maddock wrote:

I have the following regular expression for matching a URI/URL(works
fine with PCRE, note I have escaped ++ to work with boost::regex but
otherwise unchanged):

What regex did you use with pcre?  They should behave exactly the same, did you mean to use

"[something]+\\+"

ie "something" is repeated and then followed by a literal "+"? Rather than:

"[something]\\+\\+"

which matches a literal "something++" which doesn't I think occur in a URL?

John.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build