⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 regexpr.pas

📁 关于c++ builder编程的很好的资料
💻 PAS
📖 第 1 页 / 共 2 页
字号:
 -=- (-) Range checking error in some cases if ComplexBraces defined
  Thanks to Juergen Schroth
 -=- (^) 'ComplexBraces' now is defined by default
 -=- (+) Kit Eason sent to me many examples for 'Syntax' help section
  and I decided to complitely rewrite this section. I hope, You'll enjoy
  the results ;)
 -=- (+) The \A and \Z metacharacters are just like "^" and "$", except
  that they won't match multiple times when the modifier /m is used

 v. 0.939 2000.10.04
 -=- (-) Bug in Substitute method ($10.. didn't work properly)
 Thanks to Serge S Klochkovski

 v. 0.938 2000.07.23
 -=- (^) Exeptions now jump to appropriate source line, not
     to Error procedure (I am not quite sure this is safe for
     all compiler versions. You can turn it off - remove
     reRealExceptionAddr definition below).
 -=- (^) Forgotten BSUBEXP[CI] in FillFirstCharSet caused
     exeption 'memory corruption' in case if back reference can
     be first op, like this: (a)*\1 (first subexpression can be
     skipped and we'll start matching with back reference..).

 v. 0.937 2000.06.12
 -=- (-) Bug in optimization engine (since v.0.934). In some cases
     TRegExpr didn't catch right strings.
     Thanks to Matthias Fichtner

 v. 0.936 2000.04.22
 -=- (+) Back references, like <font size=(['"]?)(\d+)\1>, see
     manual for details
 -=- (+) Wide hex char support, like '\x{263a}'

 v. 0.935 2000.04.19 (by Yury Finkel)
 -=- (-) fInvertCase now isn't readonly ;)
 -=- (-) UniCode mode compiling errors

 v. 0.934 2000.04.17
 -=- (^) New ranges implementation (range matching now is very fast
      - uses one(!) CPU instruction)
 -=- (^) Internal p-code structure converted into 32-bits - works
      faster and now there is no 64K limit for compiled r.e.
 -=- (^) '{m,n}' now use 32-bits arguments (up to 2147483646) - specially
      for Dmitry Veprintsev ;)
 -=- (^) Ranges now support metachars: [\n-\x0D] -> #10,#11,#12,#13;
     Changed '-' processing, now it's like in Perl:
     [\d-t] -> '0'..'9','-','t'; []-a] -> ']'..'a'
 -=- (-) Bug with \t and etc macro (they worked only in ranges)
     Thanks to Yury Finkel
 -=- (^) Added new preprocessing optimization (see FirstCharSet).
      Incredible fast (!). But be carefull it isn's properly tested.
      You can switch it Off - remove UseFirstCharSet definition.
 -=- (^) Many other speed optimizations
 -=- (-) Case-insensitive mode now support system-defined national
      charset (due to bug in v.0.90 .. 0.926 supported only english one)
 -=- (^) Case-insensitive mode implemented with InvertCase (param &
      result of REChar type) - works 10 .. 100 times faster.
 -=- (^) Match and ExecNext interfaces optimized, added IsProgrammOk
      by Ralf Junker
 -=- (^) Increased NSUBEXP (now 15) and fixed code for this, now you
      can simply increase NSUBEXP constant by yourself.
      Suggested by Alexander V. Akimov.
 -=- (^+) Substitute adapted for NSUBEXP > 10 and significant (!)
      optimized, improved error checking.
      ATTENTION! Read new Substitute description - syntax was changed !
 -=- (+) SpaceChars & WordChars property - now you may change chars
      treated as \s & \w. By defauled assigned RegExprSpaceChars/WordChars
 -=- (+) Now \s and \w supported in ranges
 -=- (-) Infinite loop if end of range=#$FF
      Thanks to Andrey Kolegov
 -=- (+) Function QuoteRegExprMetaChars (see description)
 -=- (+) UniCode support - sorry, works VERY slow (remove '.' from
     {.$DEFINE UniCode} after this comment for unicode version).
     Implemented by Yury Finkel

 v. 0.926 2000.02.26
 -=- (-) Old bug derived from H.Spencer sources - SPSTART was
     set for '?' and '*' instead of '*', '{m,n}' and '+'.
 -=- (-^) Now {m,n} works like Perl's one - error occures only
     if m > n or n > BracesMax (BracesMax = 255 in this version).
     In other cases (no m or nondigit symbols in m or n values,
     or no '}') symbol '{' will be compiled as literal.
     Note: so, you must include m value (use {0,n} instead of {,n}).
     Note: {m,} will be compiled as {m,BracesMax}.
 -=- (-^) CaseInsensitive mode now support ranges
     '(?i)[a]' == '[aA]'
 -=- (^) Roman-number template in TestRExp ;)
 -=- (+^) Beta version of complex-braces - like ((abc){1,2}|d){3}
     By default its turned off. If you want take part in beta-testing,
     please, remove '.' from {.$DEFINE ComplexBraces} below this comments.
 -=- (-^) Removed \b metachar (in Perl it isn't BS as in my implementation,
     but word bound)
 -=- (+) Add /s modifier. Bu I am not sure that it's ok for Windows.
     I implemented it as [^\n] for '.' metachar in non-/s mode.
     But lines separated by \n\r in windows. I need you suggestions !
 -=- (^) Sorry, but I had to rename Modifiers to ModifierStr
     (ModifierS uses for /s now)

 v. 0.91 2000.02.02
 -=- (^) some changes in documentation and demo-project.

 v. 0.90 2000.01.31
 -=- (+) implemented braces repetitions {min,max}.
     Sorry - only simple cases now - like '\d{2,3}'
     or '[a-z1-9]{,7}', but not (abc){2,3} ..
     I still too short in time.
     Wait for future versions of TRegExpr or
     implement it by youself and share with me ;)
 -=- (+) implemented case-insensitive modifier and way
     to work with other modifiers - see properties
     Modifiers, Modifier, ModifierI
     and (?ismx-ismx) Perl extension.
     You may use global variables RegExpr* for assigning
     default modifier values.
 -=- (+) property ExtSyntaxEnabled changed to 'r'-modifier
     (russian extensions - see documentation)
 -=- (+) implemented (?#comment) Perl extension - very hard
     and usefull work ;)
 -=- (^) property MatchCount renamed to SubExprMatchCount.
     Sorry for any inconvenients, but it's because new
     version works slightly different and if you used
     MatchCount in your programms you have to rethink
     it ! (see comments to this property)
 -=- (+) add InputString property - stores input string
     from last Exec call. You may directly assign values
     to this property for using in ExecPos method.
 -=- (+) add ExecPos method - for working with assigned
     to InputString property. You may use it like this
        InputString := AString;
        ExecPos;
     or this
        InputString := AString;
        ExecPos (AOffset);
     Note: ExecPos without parameter works only in
     Delphi 4 or higher.
 -=- (+) add ExecNext method - simple and fast (!) way to finding
     multiple occurences of r.e. in big input string.
 -=- (^) Offset parameter removed from Exec method, if you
     used it in your programs, please replace all
        Exec (AString, AOffset)
     with combination
        InputString := AString; ExecPos (AOffset)
     Sorry for any inconvenients, but old design
     (see v.0.81) was too ugly :(
     In addition, multiple Exec calls with same input
     string produce fool overhead because each Exec
     reallocate input string buffer.
 -=- (^) optimized implementation of Substitution,
     Replace and Split methods
 -=- (-) fixed minor bug - if r.e. compilation raise error
     during second pass (!!! I think it's impossible
     in really practice), TRegExpr stayed in 'compiled'
     state.
 -=- (-) fixed bug - Dump method didn't check program existance
     and raised 'access violation' if previouse Exec
     was finished with error.
 -=- (+) changed error handling (see functions Error, ErrorMsg,
     LastError, property CompilerErrorPos, type ERegExpr).
 -=- (-^) TRegExpr.Replace, Split and ExecNext made a infinite
     loop in case of r.e. match empty-string.
     Now ExecNext moves by MatchLen if MatchLen <> 0
     and by +1 if MatchLen = 0
     Thanks to Jon Smith and George Tasker for bugreports.
 -=- (-) While playing with null-matchs I discovered, that
     null-match at tail of input string is never found.
     Well, I fixed this, but I am not sure this is safe
     (MatchPos[0]=length(AInputString)+1, MatchLen = 0).
     Any suggetions are very appreciated.
 -=- (^) Demo project and documentation was upgraded
 -=- (^) Documentation and this version was published on my home page
     http://anso.da.ru


 v. 0.81 1999.12.25 // Merry Christmas ! :)
 -=- added \s (AnySpace) and \S (NotSpace) meta-symbols
     - implemented by Stephan Klimek with minor fixes by AVS
 -=- added \f, \a and \b chars (translates into FF, BEL, BS)
 -=- removed meta-symbols '

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -