How to test Regular expression across the programming languages?
September 29th, 2010
218 views
Leave a comment
Go to comments

Prerequisite
Regular expression, in introduction with full of example
A regular expression (regex or regexp for short) is a special text string for describing a search pattern.
There are various flavours of Regular Expressions. All the flavours are 80% common. Some languages provide more elements, functions and keywords for efficient searching. Maximum of them have common regular expression elements. You can test them in various languages as follow.
AWK
awk ‘/RE/’ filename
JAVA
boolean b = Pattern.matches("RE", "contents");
PHP
preg_match_all(‘/RE/’,$contents,$result_array)
PERL
I havn’t gone through PERL syntax. But they are similar to AWK.
C# (.NET)
Regex pattern=new Regex("RE");
bool matching = return pattern.IsMatch("Contents");
Common elements are also supported by rich text editor programs like textpad or notepad++.
You can also try Online Tool to test for testing regular expression.

I welcome you. But i prefer to exchange links with user who has their own domain.
I would like to exchange links with your site article-stack.com
Is this possible?