Register to post in forums, or Log in to your existing account
 

 Related 
Contents
See also:
  Regular Expression Options
  Match
  RegReplace
String Library
  Pos
  SubStr
  Len
  Replace
  Left
  Right
  Upper
  Lower
  Proper
  IntVal
  FloatVal
  Format
  Insert
  Delete
  Concat
  LeftBack
  RightBack
  Word
  NumWord
  DeleteNWord
  Begins
  Ends
  ASCII
  IsInt
  IsFloat
  RepeatStr
  Trim
  LTrim
  RTrim
  Explode
  Join
  Match
  RegReplace
  StripTags
  EncodeHTML
  DecodeHTML
  Reverse
  Compare
  HexStr
  HexVal
  QuoteSQL
  EncodeURL
  DecodeURL
  ExtractFileName
  ExtractFileExt
  ExtractPath
  Pad
  PadRight
  Center
  Soundex
  Wordwrap
  DecimalSeparator
  CaseSens
  QuoteChar
  Regular Expression Options
  Regular Expressions
  Split
  ExpandTabs
  md5
  ForceFileExt
  LoadFromFile
  SaveToFile
  cr
  lf
  crlf
Related Links:
  Introduction to Triggers
  #REGEX
  Function Reference
  %match
  %regex
  %subregex
  Trigger Command Options
  RegReplace
  MaskKind
  Autofill
  Delphi edit mask
  AddSyntax
  Modification (strings)
  %match
  %regex
  %subregex
  Comparison
  #REGEX
  Triggers
  #TRIGGER
  Introduction to Triggers
  Pattern Matching
  Triggers
  cmd
  Advanced subregex
  Pattern Wizard
Regular Expressions [[RegEx]] 
NOTE: This Design document is subject to change at any time.
Regular expression support in zApp is provided by the PCRE library package, which is open source software, written by Philip Hazel, and copyright by the University of Cambridge, England. http://www.pcre.org/.

The following regular expression patterns are supported:

. match any single character

* match zero or more of the previous pattern

+ match one or more of the previous pattern

? match zero or one of the previous pattern

(exp) group the regular expression "exp" into a single pattern. The matching subpattern is stored in the \1..\99 variables for use in the replacement string of the RegReplace function.

(?:exp) group the regular expression as above, but do NOT store the value in the \1..\99 variables.

exp1 | exp2 match expression exp1 OR expression exp2. Any number of expressions can be listed, separated by |

[abc] match a range of letters. In this case, the letters a, b, or c are matched. You can specify a range of characters using the - operator. For example [a-z] matches any lowercase character. Putting ^ before the range defines a range of characters that are excluded. For example [^a-z] matches anything *except* a lowercase character.

^ matches the beginning of line

$ matches the end of the line

\ escapes the next character, matching that character verbatim. For example \* matches an asterisk. \\ matches a slash itself.

\s a space character (ascii 32)

\S matches any non-whitespace

\p the | pipe character

\w a word character (matches a-zA-Z0-9)

\W matches any non-word character

\a a letter (matches a-zA-Z)

\d a digit (matches 0-9)

\D matches any non-digit

\h a hex character (0-9A-F)

\n matched a newline for multiline triggers

\b matches a word boundry (zero-length match)

\B matches a non-word boundry (zero-length match)

\A matches only the beginning of the string

\Z matches only the end of the string or before a newline at the end

\z matches only the end of the string

For additional help on Perl Regular Expressions, go to http://www.perldoc.com/perl5.6/pod/perlre.html
Viewer Comments [0 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net