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

Please support RegExLib Sponsors

Sponsors

Browse Expressions by Category

91 regular expressions found in this category!

Expressions in category: Strings

Change page:   |    Displaying page 5 of 5 pages; Items 81 to 91
Title Test Details Pattern Title
Expression
(?s)(?:\e\[(?:(\d+);?)*([A-Za-z])(.*?))(?=\e\[|\z)
Description
This expression will match all of the commands(escape codes) used in ANSI files. These are what were used to create the colors/blocks on BBS's for those of us that once dialed into them. http://www.wikipedia.org/wiki/ANSI_escape_code has a reference for ANSI escape codes. http://idledreams.net/lordscarlet/posts/153.aspx shows an example of the engine I have created surrounding the expression
Matches
Hello | Test | 
Non-Matches
abc
Author Rating: Not yet rated. Doug Moore
Title Test Details Pattern Title
Expression
(NOT)?(\s*\(*)\s*(\w+)\s*(=|<>|<|>|LIKE|IN)\s*(\(([^\)]*)\)|'([^']*)'|(-?\d*\.?\d+))(\s*\)*\s*)(AND|OR)?
Description
Heres my sql clause parser regexp for recordset filtering. Does recursive query parsing all by its self. Only problem I cant figure is how to match comma separated lists of quoted strings. Tell me if you figure out how! The unicodes in the re was put in by the entry form please replace them with their ascii equivalents to use it.
Matches
Aeroplane LIKE 767 | Movie LIKE 'Star' AND NOT Movie LIKE 'Trek' | Number IN (1,2,3,4,5)
Non-Matches
Hello there | A=EXCELLENT OR | B!=POOR
Author Rating: Not yet rated. Joseph Warwick
Title Test Details Pattern Title
Expression
^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*<>:\;|\"/]+$
Description
Additional checks for <> and " characters
Matches
abc
Non-Matches
PRN
Author Rating: Not yet rated. Rahul Pandit
Title Test Details Pattern Title
Expression
^([4]{1})([0-9]{12,15})$
Description
Validate against a visa card number. All visa cards start with a 4 and are followed by 12 to 15 more numbers.
Matches
4125632152365 | 418563256985214 | 4125632569856321
Non-Matches
3125652365214 | 41256321256 | 42563985632156322
Author Rating: Not yet rated. Jeff Johns
Title Test Details Pattern Title
Expression
^([34|37]{2})([0-9]{13})$
Description
Validate against any american express number. All american express numbers start with either a 34 or 37, followed by 13 other numbers.
Matches
341256321524212 | 371524254523125
Non-Matches
425152365212542 | 34256321523621 | 3712563212523651
Author Rating: Not yet rated. Jeff Johns
Title Test Details Pattern Title
Expression
[AaEeIiOoUuYy]
Description
This simple reg-ex accepts any vowel letter.
Matches
a | o | e
Non-Matches
z | x | w
Author Rating: Not yet rated. Alexander Pinsker
Title Test Details Pattern Title
Expression
"[^"\r\n]*"
Description
returns string between two quotes
Matches
Return Parent.DB.GetDataReader("CauseImmediateGet", MyIncidentEventTypeID)
Non-Matches
Return Parent.DB.GetDataReader(CauseImmediateGet", MyIncidentEventTypeID)
Author Rating: Not yet rated. Sonal Bordia
Title Test Details Pattern Title
Expression
([^\.\?\!]*)[\.\?\!]
Description
Finds sentences (assuming they end with a full stop, question mark or exclamation mark).
Matches
This is a series of sentences. They end predictably! Where would we be without punctuation?
Non-Matches
This sentence just trails off
Author Rating: Not yet rated. Mike Reeves-McMillan
Title Test Details Pattern Title
Expression
(\S+)\x20{2,}(?=\S+)
Description
Trim Inside. This pattern can be used with a replace value of "$1 " to remove multiple consecutive spaces between characters and replace with a single space. Trailing and leading spaces are NOT altered.
Matches
Too Many spaces.
Non-Matches
No extra spaces | No Extra spaces Inside
Author Rating: Not yet rated. Michael Ash
Title Test Details Combined UK Vehicle Registration
Expression
^([A-Z]{3}\s?(\d{3}|\d{2}|d{1})\s?[A-Z])|([A-Z]\s?(\d{3}|\d{2}|\d{1})\s?[A-Z]{3})|(([A-HK-PRSVWY][A-HJ-PR-Y])\s?([0][2-9]|[1-9][0-9])\s?[A-HJ-PR-Z]{3})$
Description
UK vehicle registration system. This is the obvious combination of two previous expressions posted here, to merge the older system with the current system.
Matches
ABC 123 A | A 123 ABC | AB 12 ABC
Non-Matches
AB 123 C | A 123 AB | AB 12 AB
Author Rating: Not yet rated. Amos Hurd
Title Test Details Pattern Title
Expression
(\S*)+(\u007C)+(\S*)
Description
Useful for grabbing pipe delimited text from a string.
Matches
this is a sentence with tokens alpha|bravo|charlie
Non-Matches
only pipes not alpha,bravo
Author Rating: Not yet rated. Richard Johnn
Change page:   |    Displaying page 5 of 5 pages; Items 81 to 91

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