Loading ...
Sorry, an error occurred while loading the content.
 

regex

Expand Messages
  • Dave Pawson
    https? :////([^/?#]+)/([^?#]*)( ?([^?#]+))?(#(.*))? I m getting an x.rng:25:25: error: invalid
    Message 1 of 4 , Jun 12, 2008
      <data type="string">
      <param name="pattern">https?\:////([^/?#]+)/([^?#]*)(\?([^?#]+))?(#(.*))?</param>
      </data>

      I'm getting an '
      x.rng:25:25: error: invalid parameter: invalid regular expression:
      illegal escape:
      https?\>>>>:////([^/?#]+)/([^?#]*)(\?([^?#]+))?(#(.*))?

      error
      Where is the regex syntax for rng please?

      TIA

      --
      Dave Pawson
      XSLT XSL-FO FAQ.
      http://www.dpawson.co.uk
    • david tolpin
      Hello Dave, ... when you use regular expressions, they are Unicode Regular Expressions as defined in XML Schema. Here is the link ...
      Message 2 of 4 , Jun 12, 2008
        Hello Dave,

        > error
        > Where is the regex syntax for rng please?
        >

        when you use regular expressions, they are Unicode Regular Expressions as defined in XML Schema. Here is the link

        > error
        > Where is the regex syntax for rng please?
        >

        http://www.w3.org/TR/xmlschema-2/#regexs

        David
      • Bjoern Hoehrmann
        ... Relax NG does not have a regular expression syntax, you have to use a data type library and you would have to check whatever specification governs the type
        Message 3 of 4 , Jun 12, 2008
          * Dave Pawson wrote:
          > <data type="string">
          > <param name="pattern">https?\:////([^/?#]+)/([^?#]*)(\?([^?#]+))?(#(.*))?</param>
          > </data>
          >
          >I'm getting an '
          >x.rng:25:25: error: invalid parameter: invalid regular expression:
          >illegal escape:
          >https?\>>>>:////([^/?#]+)/([^?#]*)(\?([^?#]+))?(#(.*))?
          >
          >error
          >Where is the regex syntax for rng please?

          Relax NG does not have a regular expression syntax, you have to use a
          data type library and you would have to check whatever specification
          governs the type library you are using. If you are using XML Schema
          data types, http://www.w3.org/TR/xmlschema-2/#regexs is the place to
          check, production [24] in particular. It seems it does not like that
          you escape the ":".
          --
          Björn Höhrmann · mailto:bjoern@... · http://bjoern.hoehrmann.de
          Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
          68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
        • Dave Pawson
          Hi David. Hope all is well with you. ... https?://([^/?#]+)/([^?#]*)( ?([^?#]+))?(#(.*))? That s it.
          Message 4 of 4 , Jun 12, 2008
            Hi David. Hope all is well with you.

            2008/6/12 david tolpin <dvd@...>:

            >> Where is the regex syntax for rng please?
            >>
            >
            > http://www.w3.org/TR/xmlschema-2/#regexs

            <data type="string">
            <param name="pattern">https?://([^/?#]+)/([^?#]*)(\?([^?#]+))?(#(.*))?</param>
            </data>

            That's it. the // doesn't need escaping.

            Thanks David, and Bjoern.

            regards


            --
            Dave Pawson
            XSLT XSL-FO FAQ.
            http://www.dpawson.co.uk
          Your message has been successfully submitted and would be delivered to recipients shortly.