Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-800

4.0 XDCR Filtering regex ^ hat

    XMLWordPrintable

Details

    Description

      http://developer.couchbase.com/documentation/server/4.0/xdcr/xdcr-reg-expressions.html

      The page states:

      ^ This is the "not" character, therefore [^0-9] matches against any character that is not a digit.

      that isn't entirely true and could be confusing, we use the javascript regex model, looking at the mozilla regex docs a hat character "^" has 2 meanings and the "not" attribute is the least common attribute.

      https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions
      states:
      Matches beginning of input. If the multiline flag is set to true, also matches immediately after a line break character.

      For example, /^A/ does not match the 'A' in "an A", but does match the 'A' in "An E".

      The '^' has a different meaning when it appears as the first character in a character set pattern. See complemented character sets for details and an example.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            marija Marija Jovanovic (Inactive)
            ianmccloy Ian McCloy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty