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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 19
Title Test Details Url pattern matching
Expression
(http):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+(\\.[\\w\\-_]+)(\\/)([\\w\\-\\.,@?^=%&:/~\\+#]*[\\w\\-\\@?^=%&/~\\+#]+)(\\/)((\\d{8}-)|(\\d{9}-)|(\\d{10}-)|(\\d{11}-))+([\\w\\-\\.,@?^=%&:/~\\+#]*[\\w\\-\\@?+html^])?
Description
match http urls in format http://kamitsinha.com/regex/191929393-latestnews.htm
Matches
http://kamitsinha.com/regex/191929393-latestnews.htm
Non-Matches
http://kamitsinha.com/regex/latestnews.htm;http://kamitsinha.com/regex;http://kamitsinha.com/regex/19-latestnews.htm
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Pattern matching for next page
Expression
(\d)+\<\/a\>
Description
While screen scraping to validate if Next page exists
Matches
2<\a>,3<\a>
Non-Matches
next<\a>, previous<\a>
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Href matching
Expression
href\s*=\s*\"((\/)([i])(\/)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#]+)*)\"
Description
pattern matching for "href=\ddd\ss080978"
Matches
"href=\i\ss080978", "href=\l\ss080978"
Non-Matches
"href=www.kamitsinha.com",
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Extract Titles from webpage
Expression
<title>(.*?)</title>
Description
This regular expression can be used to extract titles from web page
Matches
<title>Regular Expression Library</title>
Non-Matches
<td>Regular Expression Library</td>
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Extract script from web page
Expression
<script[\\.|\\W|\\w]*?</script>
Description
Any java script from web page can be extracted using the regular expression
Matches
<script language="javascript"> alert("hello"); </script>
Non-Matches
<style> .body </style>
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Replace space between words
Expression
([ ]?[\\*~`!@#\\%\\^\\*\\(\\)_\\-\"\"':;\\,\\.\\?\\-\\+\\{\\}\\/\\& ][ ]?|\\b)
Description
this regular expression can be used to replace white space between words
Matches
Amit Kumar Sinha
Non-Matches
Amitkumarsinha
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Extract Feedback score from web page
Expression
\\(+\\d{3}|\\d{2}|\\d{1}\\)?
Description
Using this regular expression feedback score can be extracted
Matches
999,321,789
Non-Matches
666666
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Extract date from webpage
Expression
\\s\\d{2}[-]\\w{3}-\\d{4}
Description
this regular expression can be used to extract the date from webpage
Matches
22-Mar-2009
Non-Matches
22/10/2009
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Extract country from webpage
Expression
\\[\\w{2}\\]
Description
this regular expression can be used to extract country code from web page
Matches
[US] , [CN]
Non-Matches
USA, CANADA
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Extract Price in $
Expression
\\$\\d+[.]?\\d*
Description
All the prices available in web page can be extracted
Matches
$ 10, $45.90
Non-Matches
10, 89
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Replace comment from html page
Expression
<!--[\\.|\\W|\\w]*?-->
Description
the comments on html page can be extracted or removed.
Matches
<!- <td> amit kumar sinha </td> -->
Non-Matches
<td> amit kumar sinha </td>
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Extract current page number and total page
Expression
(\\d{1}-\\d{2}\\s*)(of +)(\\s?\\d{5})|(\\d{1}-\\d{2}\\s*)(of +)(\\s?\\d{4})|(\\d{1}-\\d{2}\\s*)(of +)(\\s?\\d{3})|(\\d{1}-\\d{2}\\s*)(of +)(\\s?\\d{2})|(\\d{1}-\\d{2}\\s*)(of +)(\\s?\\d{1})
Description
Matching pattern like 1-15 of 15
Matches
1-15 of 15
Non-Matches
2 of 20
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Url pattern matching
Expression
href\\s*=\\s*\\\"((\\/)([\\w\\-\\.,@?~\\+#]+)*)\\\
Description
http://www.sell.com/23D2RQ
Matches
http://www.sell.com/23D2RQ
Non-Matches
http://www.sell.com/23D2RQ/aks.html
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Find days and hour from web page
Expression
\d{1,2}d \d{1,2}h
Description
82d 10h
Matches
82d 10h
Non-Matches
10h, 82d
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details double quotes check
Expression
"^[^\"]+$"
Description
this regular expression can be used to validate the existance of double quotes
Matches
Amit
Non-Matches
Amit"
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details css definition split
Expression
\s*("[^"]+"|[^ ,]+)
Description
css definition split on space or comma but keep "" enclosed items for string like '10pt "Times Roman", Helvetica,Arial, sans-serif
Matches
"10pt" ,"\"Times Roman\"", "Helvetica" ,"Arial", "sans-serif"
Non-Matches
'10pt#Times Roman#Helvetica#Arial#sans-serif'
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Match Website
Expression
http://(www\.)?([^\.]+)\.com
Description
This regex matches 'http://' optionally followed by 'www.' then starts a group and matches one or more of any character that is not a full stop/period (.) closes the group then matches '.com'.
Matches
http://www.yahoo.com ; http://yahoo.com
Non-Matches
yahoo.com
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Email Address Validation
Expression
/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i
Description
Valiation of Email Address based on Wiki\Email_Address
Matches
very.common@example.com
Non-Matches
abc.abc.com
Author Rating: Not yet rated. Amit kumar sinha
Title Test Details Good Email Validator
Expression
"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"
Description
This regular expression will only validate addresses that have had any comments stripped and replaced with whitespace (this is done by the module).
Matches
abc@gmail.com
Non-Matches
a bc@gmail.com
Author Rating: Not yet rated. Amit kumar sinha
   Displaying page 1 of 1 pages; Items 1 to 19

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