IDE regular expressions

From Lazarus wiki
Revision as of 12:13, 1 May 2006 by Mattias2 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Normal regular expression

They are pretty similar to Perl regular expression syntax.

Point .

Matches any character. Example: 'a.c' matches 'abc', 'aBC', 'axc', 'a3c', 'a$c', etc.

Round brackets ( )

Useful to bound expressins. For example: (abc)+ matches 'abc' or 'abcabc' or 'abcabcabc' etc.


Simple Syntax

Some IDE dialogs provide a checkbox to enable 'simple syntax'. These regular expressions are shorter for common file name filters.

Technically it does this:

  The following characters are replaced with
  . -> \.
  * -> .*
  ? -> .
  , -> |
  ; -> |
  
  Finally enclose by ^( )$


Search and Replace with regular expressions