Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Needed #21

Open
jpbro opened this issue Oct 1, 2017 · 1 comment
Open

Documentation Needed #21

jpbro opened this issue Oct 1, 2017 · 1 comment
Assignees

Comments

@jpbro
Copy link
Owner

jpbro commented Oct 1, 2017

VBPCRE2 needs documentation.

@jpbro jpbro self-assigned this Oct 1, 2017
@dragokas
Copy link

dragokas commented May 1, 2022

I will be first :)

Some info about ActiveX Dll.

Download

Pre-compiled binary is here

Installation

Open command prompt (cmd.exe) as Administrator, execute:

regsvr32.exe "<path>\VBPCRE2.dll"

List of objects:

VBPCRE2.cPcre2
VBPCRE2.cPcre2Match
VBPCRE2.cPcre2Matches
VBPCRE2.cPcre2Options
VBPCRE2.cPcre2OptionsCompile
VBPCRE2.cPcre2OptionsGeneral
VBPCRE2.cPcre2OptionsMatch
VBPCRE2.cPcre2OptionsReplace

Examples:

For VBScript:

set lo_RegEx = CreateObject("VBPCRE2.cPcre2")

Usage examples are here

Full docs is in PRCE2 specification.

New methods

(comparing to VBScript.Regexp):

New metasymbols

(comparing to VBScript.Regexp):

  • (?=template) Lookahead positive
  • (?!template) Lookahead negative
  • (?<=template) Lookbehind positive
  • (?<!template) Lookbehind negative
  • TODO...

Objects hierarchy

  • Available in VBA using Magic key "F2" :) which is Object Explorer. Then select "VBPCRE2" from drop-down list.
  • Don't forget about IntelliSense tips + "Early binding": press "Tools" - "References" - Select file VBPCRE2.dll (or select in list "VBPCRE2").

Early

Option Constants

(which suits the names in specification where description could be found)
TODO: Need check/bind/doc links...

Basic

  • PCRE2_ANCHORED
  • PCRE2_NO_UTF_CHECK
  • PCRE2_NOTBOL
  • PCRE2_NOTEOL
  • PCRE2_NOTEMPTY
  • PCRE2_NOTEMPTY_ATSTART
  • PCRE2_PARTIAL_SOFT
  • PCRE2_PARTIAL_HARD
  • PCRE2_ERROR_NOMATCH
  • PCRE2_SUBSTITUTE_GLOBAL

Compile

  • PCRE2_ALLOW_EMPTY_CLASS
  • PCRE2_ALT_BSUX
  • PCRE2_CASELESS
  • PCRE2_DOLLAR_ENDONLY
  • PCRE2_DOTALL
  • PCRE2_EXTENDED
  • PCRE2_FIRSTLINE
  • PCRE2_MULTILINE
  • PCRE2_UNGREEDY
  • PCRE2_UTF
  • PCRE2_NEVER_BACKSLASH_C
  • PCRE2_ALT_CIRCUMFLEX
  • PCRE2_AUTO_CALLOUT
  • PCRE2_DUPNAMES

Unimplemented

  • PCRE2_MATCH_UNSET_BACKREF
  • PCRE2_NEVER_UCP
  • PCRE2_NEVER_UTF
  • PCRE2_NO_AUTO_CAPTURE
  • PCRE2_NO_AUTO_POSSESS
  • PCRE2_NO_DOTSTAR_ANCHOR
  • PCRE2_NO_START_OPTIMIZE
  • PCRE2_UCP

Substitute

  • PCRE2_SUBSTITUTE_EXTENDED
  • PCRE2_SUBSTITUTE_UNSET_EMPTY
  • PCRE2_SUBSTITUTE_UNKNOWN_UNSET

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants