EasyPattern Engine COM DLL provides a cool new way to describe text patterns. They're English-like, powerful and easy to understand. EasyPatterns make parsing a US phone number as easy as
[ PhoneNumber ] or if you prefer the long way: [ optional punctuation, 3 digits, punctuation, 3 digits, punctuation, 4 digits ] Once found it's easy to re-arrange it or reformat it.
Using this pattern: [ optional punctuation, capture(3 digits), punctuation, capture(3 digits), punctuation, capture(4 digits) ]
...we could re-arrange phone numbers like this: $1.$2.$3 ($1) $2$3 +1.$1.$2.$3
-How easy is that!
You can easily control the quantity of text you match, and include literal text like this: [ 1 or more digits, '.', 2 digits ] $[ 2+ digits, '.', 2 digits ] USD [ 3 to 6 digits ].00
You can easily match dates like this: [ Day Month Year ] [ Month Day Year ] [ Year Month Day ] ('Month' matches numbers 1-12, and short and long month names)
EasyPatterns are included in TextPipe Pro - the world's fastest multi-search and replace tool.
EasyPattern Engine keywords: ezpattern, ezpatterns, easypatterns, easypattern, perl, grep, egrep, pattern, easy pattern, easy patterns, ez pattern, ez patterns