No announcement yet.

RegExps: how much of PCRE?

  • Filter
  • Time
  • Show
Clear All
new posts

  • RegExps: how much of PCRE?

    I am currently evaluating BC3 for use at our company (MYOB), and have some questions...

    I am really glad to see that BC3's RegExp support leverages PCRE, but I see in the help file that it is a "subset" of PCRE.

    Can anyone tell me exactly which parts of PCRE (and which version of PCRE for that matter) are supported?

    I am very familiar with all the individual parts of the full PCRE (v7.6) syntax, but would like to find out without trial & error which are supported.

    I am aware that BC3 applies them to a line-at-a-time of the source in at least some cases; clarification of this would also be appreciated. (c:

  • #2
    Hi Guf,

    Some parts of BC3 use PCRE and some use a syntax-compatible subset that is not based on the PCRE code.
    1. The text Find/Replace uses PCRE 6.4. I think it's close to the full thing, but it's wrapped by a third-party library, so I don't know specifics.
    2. The regular expression support used for importance and grammar highlighting does not use PCRE. It supports:
      • The metacharacters: \^$.[!*)?*+{}\^-]
      • Escaping characters: \a, \t, \f, \e, \cx, \ddd, \xhh, \x{hhh..}
      • Character sets: \d, \D, \s, \S, \w, \W
      • Iterators (greedy): {n}, {n,}, {n,m}

    Matching across lines in either case is not supported.
    Zoë P Scooter Software


    • #3
      I suggest tagging this for inclusion in the manual.


      • #4
        3rd party lib..?

        Would that 3rd party library be the JediCodeLibrary one by any chance?
        If so, they have in their latest release moved to PCRE 7.7 I think.


        • #5
          Nope, it's DIRegEx
          Zoë P Scooter Software


          • #6
            Looks like they just updated to PCRE7.7 too (c:
            I might just have to try out their lib sometime at work - and see if I can port my RegExp parser to it (a tool that analyses what you type and shows it as a tree), tho it seems they have something to help edit REs too...


            • #7
              ...can anyone say "SpamBot"?