Analyzes a string given a regular expression
Category: General
Parameter:
Let us assume that the source property represents a date of the
format:
20081209
and that the target property needs a date in the format :
YYYY-MM-DD HH:MM:SS
We can use a regular expression like:
([0-9]{4})([0-9]{2})([0-9]{2})
and an output format:
{1}-{2}-{3} 00:00:00
to achieve our goal.
In fact the result of the above example will result in:
2008-12-09 00:00:00
Regex Group |
Explained |
Caught part of 20081209 |
([0-9]{4}) |
catches 4 numbers between 0 and 9 |
2008 |
([0-9]{2}) |
catches 2 numbers between 0 and 9 |
12 |
([0-9]{2}) |
catches 2 numbers between 0 and 9 |
09 |