A brief introduction of regular expressions with emphasis on their application in the MobilChange
system environment. MobilChange uses regular expressions in many instances, for example in routing configurations
for outgoing and incoming messages. This document describes the basics of regular expression applications.
Expression |
What is found? |
Praha. |
String Praha |
Prah. |
Strings Praha, Prahy, Prahu etc. |
Prah. * |
Strings Praha, Prahy, Prahu, . . . , Prahou etc. |
^Praha |
String Praha at the beginning of expression being compared. |
Praha$ |
String Praha at the end of expression being compared. |
^Praha$ |
String Praha exactly as value of compared expression |
P[rR][aA][hH][aA] |
Praha with case insensitive letters from the second to fifth position. |
[a-zA-Z] |
Any letters of English alphabet. |
[A-Z]* |
String of any length consisting only of capital letters of English alphabet. |
[A-Z][A-Z]* |
String (at least one char long) consisting only of capital letters of English alphabet. |
[A-Z]. * |
String (at least one char long), starting with capital letter. Other chars can be any. |
part[0-9] |
Values part0, part1, . . . , part9. |
[Rr][Ff][Cc][0-9].*\. [Hh][Tt][Mm]. * |
Request for finding RFC document - at the beginning of filename must be "RFC" string no matter of letter size.
Then one number follows and any other characters. There is "htm" extension after dot sign, which can be extended (to HTML for example).
|