Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
Skip Navigation LinksHome » Services » Regular Expressions

Regular expressions provide a flexible means for matching strings of text, such as particular characters, words, or patterns of characters. A regular expression is written in a formal language that can be interpreted by a regular expression processor, a program that either serves as a parser generator or examines text and identifies parts that match the provided specification. (See Wikipedia: Regular Expressions)

Regex is used to parse, replace, or manipulate text and streams according to needs.

The function below will take a text field and replace it according to the regular expression pattern and replacement:

Example: to extract and format domain names from a string for Google AdSense:
Text to process: xn--00w,com,Yes,Registered,Not Locked,No,"eNom, Inc.",2015-03-26 13:03:01,2016-03-26 13:03:00,,alfikw,disabled,,2,Available,,",,,"
Pattern: (xn--.+?),(com|net|org).+
Replacement: $1.$2, ja

Text to process