Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-798

regular expressions needs to support branches

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • 1.1.4, 2.0.2, 1.2.3
    • 1.2.1, 1.1.2, 1.0.4, 2.0.1
    • parser
    • None
    • Operating System: All
      Platform: All

    • 8867

      I am using "stable/boron". When I compile yang files to java, I think yangtools mistakenly interprets the regular expressions.
      For example,
      typedef yang-fd-id {
      type string {
      pattern "[0-9a-f]

      {8}/[a-z]/[0-9]|top[a-z]*fd";
      }
      }

      The XSD regular expressions "[0-9a-f]{8}

      /[a-z]/[0-9]|top[a-z]*fd" has two branches, but after converted to Java code, the Java regular expressions is "^[0-9a-f]

      {8}/[a-z]/[0-9]|top[a-z]*fd$".

      I think it should be "^[0-9a-f]{8}

      /[a-z]/[0-9]$|^top[a-z]*fd$".

            rovarga Robert Varga
            angelanzhe@gmail.com anzhe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: