RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

Change page:   |    Displaying page 1 of 2 pages; Items 1 to 20
Title Test Details Diacritics
Expression
([A-Z]|[a-z])|\/|\?|\-|\+|\=|\&|\%|\$|\#|\@|\!|\||\\|\}|\]|\[|\{|\;|\:|\'|\"|\,|\.|\>|\<|\*|([0-9])|\(|\)|\s
Description
This regex will eliminate all diacritics characters. To make it clear, if this is embedded in a javascript or any other coding it will not accept diacritics
Matches
a to z, A to Z, all numerics and special characters
Non-Matches
Àášó etc..
Author Rating: Not yet rated. Mukundh
Title Test Details HTML Tag operation - Identification and Extraction
Expression
(\<(.*?)\>)(.*?)(\<\/(.*?)\>)
Description
This will identify all the characters in between html tags irrespective of the length of the character or intiger. If scenario emerges to extract content between tags a replacement string can be used: $3
Matches
<td>city</td> <head>ok</head>
Non-Matches
content without tags
Author Rating: The rating for this expression. Mukundh
Title Test Details Executive Moves
Expression
\b ?(a|A)ppoint(s|ing|ment(s)?|ed)?| ?(J|j)oin(s|ed|ing)| ?(R)?recruit(s|ed|ing(s)?)?| (H|h)(is|er)(on)? dut(y|ies)?| ?(R)?replace(s|d|ment)?| (H)?hire(s|d)?| ?(P|p)romot(ed|es|e|ing)?| ?(D|d)esignate(s|d)| (N)?names(d)?| (his|her)? (P|p)osition(ed|s)?| re(-)?join(ed|s)|(M|m)anagement Changes|(E|e)xecutive (C|c)hanges| reassumes position| has appointed| appointment of| was promoted to| has announced changes to| will be headed| will succeed| has succeeded| to name| has named| was promoted to| has hired| bec(a|o)me(s)?| (to|will) become| reassumes position| has been elevated| assumes the additional (role|responsibilit(ies|y))| has been elected| transferred| has been given the additional| in a short while| stepp(ed|ing) down| left the company| (has)? moved| (has)? retired| (has|he|she)? resign(s|ing|ed)| (D|d)eceased| ?(T|t)erminat(ed|s|ing)| ?(F|f)ire(s|d|ing)| left abruptly| stopped working| indict(ed|s)| in a short while| (has)? notified| will leave| left the| agreed to leave| (has been|has)? elected| resignation(s)?
Description
This regex is really helpful if you are trying to find out executive moves. For instance you have 100 docs with company details but you need to find out the newly joined executives and resigned executives, you can do it with this.
Matches
resigns, joins, joined, recruited, appointed etc..
Non-Matches
non-related content
Author Rating: Not yet rated. Mukundh
Title Test Details Email Identification - Alternate method
Expression
\b([A-Za-z0-9]+)(-|_|\.)?(\w+)?@\w+\.(\w+)?(\.)?(\w+)?(\.)?(\w+)?\b
Description
This RE will be useful in identifying emails.
Matches
Non-Matches
non emails.
Author Rating: Not yet rated. Mukundh
Title Test Details DB naming convention - Regex
Expression
\b([A-Za-z0-9]+)( )([A-Za-z0-9]+)\b
Description
Replaces the space character with an underscore, this regex replacement will be useful if you have change the naming convention for DB field names. The replacement string will be: $1_$3 (you can opt anything instead of "_" in the replacement string for instance, $1-$2
Matches
(ABC CBA) (abc cba) (123 321) (aBc123 123Abc)
Non-Matches
(wordswithoutspaceinbetween)
Author Rating: Not yet rated. Mukundh
Title Test Details Doubled word/character identification
Expression
\b([A-Za-z]+) +\1\b
Description
This RE will find doubled words/characters in a sentence. This will give a helping hand in content QC where you need to identify and remove unnecessary repetitive words/characters.
Matches
(t t) (one one) (two two) (to to) (word word) (regexlib regexlib)
Non-Matches
(two_two) (to-to) (to 12) (1234 that) (to to123)
Author Rating: Not yet rated. Mukundh
Title Test Details Douled numerics identification
Expression
\b([0-9]+) +\1\b
Description
Repetition of two numeric sets can be identified with this RE.
Matches
(1 1) (33 33) (1234567890 1234567890)
Non-Matches
(1 1two) (1 one) (twothree4 234)
Author Rating: The rating for this expression. Mukundh
Title Test Details Doubled alphanumeric/alpha/numeric identification
Expression
\b([A-Za-z0-9]+) +\1\b
Description
Repeated word/character/number/number with alpha character can be identified with this RE
Matches
(123a 123a) (22 22) (ab ab) (ad12 ad12)
Non-Matches
(1 1two) (1 one) (twothree4 234) (24rg 24gr) (re45 re54) (k-k k-k)
Author Rating: Not yet rated. Mukundh
Title Test Details Doubled word/character identification & Replacement
Expression
\b([A-Za-z0-9]+) +\1\b replacement string--->$1
Description
The above RE will identify doubled alphanum/num/alpha and replaces with a single occurance.
Matches
(9Aioj 9Aioj) will be replaced and trimed to (9Aioj)
Non-Matches
(k-k k-k) (kkkk kkkk kkkk kkkk) - cannot be replaced with (kkkk) - only one repetition is handled, two consequtive repetitions will be identified but will not get replaced
Author Rating: Not yet rated. Mukundh
Title Test Details Remove Blank lines (Single or Multiple)
Expression
(\n\r) replacement string---->\n
Description
(\n\r) removes single or multiple blank\empty lines. The replacement string will be \n Simple but powerful and really useful
Matches
blank\empty lines
Non-Matches
non-blank\non-empty lines
Author Rating: Not yet rated. Mukundh
Title Test Details Remove leading and trailing spaces
Expression
^[ \t]+|[ \t]+$
Description
This RE will identify leading and trailing spaces. To trim this just replace with nothing.
Matches
( dfdfd ) (dfd ) ( dfdfddf)
Non-Matches
(dfdf dfdf dfdf) (d d) (343cfdfd dfdfd)
Author Rating: Not yet rated. Mukundh
Title Test Details US Phone Number - Normalization
Expression
^([\.\"\'-/ \(/)\s\[\]\\\,\<\>\;\:\{\}]?)([0-9]{3})([\.\"\'-/\(/)\s\[\]\\\,\<\>\;\:\{\}]?)([0-9]{3})([\,\.\"\'-/\(/)\s\[\]\\\<\>\;\:\{\}]?)([0-9]{4})$
Description
This RE recognizes unformatted US phone numbers. The replacement string is $2-$4-$6. Helps when you want to normalize the phone numbers in a DB field.This also identifies a single space given before are after the part of first, second 3 digits and before the last 4 digits. The replaced format will be "123-456-7890"
Matches
(123)-123/2345 1234567890 123-123-2345 123/234\8976 333.334,3456
Non-Matches
(1234567890 jdfojsdoj) ( 3456789098) (sdfhdih 675-576-9087)
Author Rating: The rating for this expression. Mukundh
Title Test Details Eliminate Junk lines
Expression
^[^a-zA-Z0-9]+$
Description
This RE will be very useful if you want to eliminate non-alpha\numeric containing lines. For example, you have 10000 records in a DB field and you need to identify and eliminate fully unwanted character containing lines, this will help you.
Matches
[{}[-=+_ !@#$%^&*()_+
Non-Matches
++++match+++ -) (*&^%$#@!233434dfdjb*(&R%^^%^)
Author Rating: Not yet rated. Mukundh
Title Test Details URL identifier - simple method
Expression
^(http(s)?\:\/\/\S+)\s
Description
This RE will identify URLS only starting with http or https. Please test this before using.
Matches
http://abci.com http://www.abc.co.uk
Non-Matches
www.dfkdpkf.com http:/dkfjdkjfkldj.com
Author Rating: Not yet rated. Mukundh
Title Test Details Diacritics identification
Expression
[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x1C\x1D\x1E\x1F\x60\x80\x8A\x8C\x8E\x9A\x9C\x9E\x9F\xA7\xAE\xB1\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF\u0060\u00A2\u00A3\u00A4\u00A5\u00A6\u00A7\u00A8\u00A9\u00AA\u00AB\u00AC\u00AE\u00AF\u00B0\u00B1\u00B2\u00B3\u00B4\u00B5\u00B7\u00B9\u00BA\u00BB\u00BC\u00BD\u00BE\u00BF\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5\u00C6\u00C7\u00C8\u00C9\u00CA\u00CB\u00CC\u00CD\u00CE\u00CF\u00D0\u00D1\u00D2\u00D3\u00D4\u00D5\u00D6\u00D8\u00D9\u00DA\u00DB\u00DC\u00DD\u00DE\u00DF\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5\u00E6\u00E7\u00E8\u00E9\u00EA\u00EB\u00EC\u00ED\u00EE\u00EF\u00F0\u00F1\u00F2\u00F3\u00F4\u00F5\u00F6\u00F8\u00F9\u00FA\u00FB\u00FC\u00FD\u00FE\u00FF\u0100\u0101\u0102\u0103\u0104\u0105\u0106\u0107\u0108\u0109\u010A\u010B\u010C\u010D\u010E\u010F\u0110\u0111\u0112\u0113\u0114\u0115\u0116\u0117\u0118\u0119\u011A\u011B\u011C\u011D\u011E\u011F\u0120\u0121\u0122\u0123\u0124\u0125\u0126\u0127\u0128\u0129\u012A\u012B\u012C\u012D\u012E\u012F\u0130\u0131\u0132\u0133\u0134\u0135\u0136\u0137\u0138\u0139\u013A\u013B\u013C\u013D\u013E\u013F\u0140\u0141\u0142\u0143\u0144\u0145\u0146\u0147\u0148\u0149\u014A\u014B\u014C\u014D\u014E\u014F\u0150\u0151\u0152\u0153\u0154\u0155\u0156\u0157\u0158\u0159\u015A\u015B\u015C\u015D\u015E\u015F\u0160\u0161\u0162\u0163\u0164\u0165\u0166\u0167\u0168\u0169\u016A\u016B\u016C\u016D\u016E\u016F\u0170\u0171\u0172\u0173\u0174\u0175\u0176\u0177\u0178\u0179\u017A\u017B\u017C\u017D\u017E\u017F\u0180\u0181\u0182\u0183\u0184\u0185\u0186\u0187\u0188\u0189\u018A\u018B\u018C\u018D\u018E\u018F\u0190\u0191\u0192\u0193\u0194\u0195\u0196\u0197\u0198\u0199\u019A\u019B\u019C\u019D\u019E\u019F\u01A0\u01A1\u01A2\u01A3\u01A4\u01A5\u01A6\u01A7\u01A8\u01A9\u01AA\u01AB\u01AC\u01AD\u01AE\u01AF\u01B0\u01B1\u01B2\u01B3\u01B4\u01B5\u01B6\u01B7\u01B8\u01B9\u01BA\u01BB\u01BC\u01BD\u01BE\u01BF\u01C0\u01C1\u01C2\u01C4\u01C5\u01C6\u01C7\u01C8\u01C9\u01CA\u01CB\u01CC\u01CD\u01CE\u01CF\u01D0\u01D2\u01D3\u01D4\u01D5\u01D6\u01D7\u01D8\u01D9\u01DA\u01DB\u01DC\u01DD\u01DE\u01DF\u01E0\u01E1\u01E2\u01E3\u01E4\u01E5\u01E6\u01E7\u01E8\u01E9\u01EA\u01EB\u01EC\u01ED\u01EE\u01EF\u01F0\u01F1\u01F2\u01F3\u01F4\u01F5\u01FA\u01FB\u01FC\u01FD\u01FE\u01FF\u0200\u0201\u0202\u0203\u0204\u0205\u0206\u0207\u0208\u0209\u020A\u020B\u020C\u020D\u020E\u020F\u0210\u0211\u0212\u0213\u0214\u0215\u0216\u0217\u021E\u0250\u0252\u0259\u025A\u025B\u025C\u025D\u025E\u025F\u0260\u0263\u0264\u0265\u0266\u0267\u0268\u0269\u026B\u026C\u026D\u026E\u026F\u0270\u0271\u0272\u0273\u0276\u0277\u0278\u0279\u027A\u027B\u027C\u027D\u027E\u027F\u0281\u0282\u0283\u0284\u0285\u0286\u0287\u0288\u0289\u028A\u028B\u028C\u028D\u028E\u028F\u0290\u0291\u0292\u0293\u0294\u0295\u0296\u0297\u0298\u0299\u029A\u029B\u029C\u029D\u029E\u02A0\u02A1\u02A2\u02A3\u02A4\u02A5\u02A6\u02A7\u02A8\u033D\u033E\u0342\u0343\u0344\u0345\u0386\u0388\u0389\u038A\u038C\u038E\u038F\u0390\u0393\u0394\u0398\u039E\u039F\u03A0\u03A3\u03A6\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\u03D0\u03D1\u03D2\u03D3\u03D4\u03D5\u03D6\u03E0\u03E2\u03E3\u03E4\u03E5\u03E6\u03E7\u03EE\u03EF\u03F0\u03F1\u0403\u0404\u0407\u0409\u040A\u040B\u040C\u040E\u040F\u0411\u0414\u0416\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0424\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043F\u0444\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0451\u0452\u0453\u0454\u0457\u0459\u045A\u045B\u045C\u045E\u045F\u0460\u0461\u0462\u0463\u0464\u0465\u0466\u0467\u0468\u0469\u046A\u046B\u046C\u046D\u046E\u046F\u0470\u0471\u0472\u0473\u0476\u0477\u0478\u047
Description
This RE will identify any diacritics. Pretty useful to validate fields wherein you do not want any junk characters to get in.
Matches
all alphan, numeric and special characters
Non-Matches
diacritic characters - …€¢‰™º½©œ¼‘Ž¤Ÿ¨»¦ˆ“˜„‡] (samll eg.)
Author Rating: Not yet rated. Mukundh
Title Test Details Trim HTML tags with content
Expression
<(.|\n)*?>
Description
This regex will remove the HTML tags with content
Matches
<BR> </a>
Non-Matches
any text without tag
Author Rating: Not yet rated. Mukundh
Title Test Details Doubled word/character - Replace with single word
Expression
\b([A-Za-z]+) +(\1\b)
Description
"one one" can be replaced with "one". This RE will help you in removing the duplicated successor with single word or character. The replacement string will be $1
Matches
one one, two two, you you, work work, I I
Non-Matches
normal sentence
Author Rating: Not yet rated. Mukundh
Title Test Details Identify Special Characters
Expression
[^a-zA-Z0-9]+
Description
This RE will identify all the special characters(non alpha/numeric).
Matches
!@#$%^&*()_+
Non-Matches
WORD word 123456778
Author Rating: The rating for this expression. Mukundh
Title Test Details Inidna Phone Number matching
Expression
(?:\+\s*\d{2}[\s-]*)?(?:\d[-\s]*){10}
Description
This regex will match Inidian Phone Numbers
Matches
9878676543, 987 987 0909, 987-897-0987
Non-Matches
(908) 909 6786, (987)-908-0987
Author Rating: Not yet rated. Mukundh
Title Test Details Non numeric
Expression
\D
Description
\d used to find numeric but if we use \D, it will find non-numeric characters
Matches
12345....
Non-Matches
abcdef....
Author Rating: Not yet rated. Mukundh
Title Test Details Matching US zip codes
Expression
^[0-9]{5}(-[0-9]{4})?$
Description
This expression will match 5 or 9 digit US zip codes
Matches
23654, 92456-1234
Non-Matches
236541, 222, 22, 1, 45-568845
Author Rating: Not yet rated. Mukundh
Change page:   |    Displaying page 1 of 2 pages; Items 1 to 20

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials