Regular expressions additional help … don’t hesitate to add your own examples / comments here
Here is a listing of the most popular regular expression patterns.
Rule | Syntax |
---|---|
Exactly one occurence of x | x |
At least one occurence of x | x+ |
0 or many occurences of x | x* |
0 or 1 occurence of x | x? |
Escape character | \ |
Any single character | . |
One character in a predefined set | [list-of-characters] … examples : [ABCD], [012345789] |
One character in a character range | [character1-character2] … examples : [0-9], [a-zA-Z] … |
Any character except those contained in a predefined set | [^list-of-characters] … examples : [^ABCD], [^0-9] |
Tab | \t |
New line | \n |
Carriage return | \r |
Beginning of the line | ^ |
End of the line | $ |
Example | Syntax |
---|---|
All filenames ending with “.html” | ^.*.html$ |
All filenames containing “client” | ^.client.$ |
All folders containing “_svn” | ^.\_svn\.$ |
This page has been deleted on 22:10, 5 September 2012 (Areca Backup v7.2.12~7.2.13)
Top | Copyright (c) 2005-2015 Olivier PETRUCCI | archive.org |