Product Home
DTM Data Scrabber Online Documentation Prev Page Prev Page
General Information
Product Profile
Data Verification
Data Scrubbing
Connect
Quick Start
Direct Connection
Connect to Desktop File
Data Sources
DSN File
OLE DB Connection
Connection Profile
Connection Information
Troubleshooting Guide
Types of Data Checks
Column to column
Expressions
Regular Expressions
Actions
Cleaning Script
Execution Console
Report Viewer
Project Properties
Project Report
Command Line
Console Mode
Log Viewer
How to...
Settings
Hot keys
SQL Console
Additional Information
License
Demo and Full versions
Support
Install
Uninstall
Upgrade
Trademark Information
Database Tools
Glossary

Regular Expressions Usage

A regular expression is a special template type allowing you to create effective checks and substring changes in data. An expression consists of usual characters and meta symbols.

Most popular meta symbols and language clauses are:

Item Match with
^ the beginning of line
$ the end of line
. any character
[ ] characters in set
[^ ] characters not in set
| previous or next pattern
? previous pattern 0 or 1 times
+ previous pattern 1 or more times
* previous pattern 0 or more times
( ) group pattern and remember to \n variable

If part of the expression is enclosed in brackets, after the matching is over, the substring value gets into a variable of the type \n, where n is the number of the expression from the beginning of the string. These variables can be used only in replace actions.

Useful regular expressions

Regexp Description
^[0-9A-Fa-f]+$ Hexadecimal number
^\\(\\d{3}\\) ?\\d{3}[- ]\\d{4}$ Phone number (NNN) NNN-NNNN
^^\\+[1-9] \\(\\d{3}\\) ?\\d{3}[- ]\\d{4}$ International phone number +N (NNN) NNN-NNNN
^http\\://[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(/\\S*)?$ URL
^[0-9a-zA-Z_\\.]+@([0-9a-zA-Z_\\-]+?\\.){1,2}[a-zA-Z]{2,4}$/td> E-mail