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 2
Title Test Details Pattern For WebCrawler to find contact details
Expression
[\+]{0,1}(\d{10,13}|[\(][\+]{0,1}\d{2,}[\13)]*\d{5,13}|\d{2,6}[\-]{1}\d{2,13}[\-]*\d{3,13})
Description
This is useful for finding contact numbers, or mobile numbers or phone numbers while crawling websites.
Matches
123-12-1233 | (02717)230464 | +919427237800 | +9427237800 | 02717-230464
Non-Matches
23046 | 123456780123456790000
Author Rating: The rating for this expression. Kuleen Upadhyaya
Title Test Details Pattern to find Anchor Tag in a web page
Expression
<a[\s]+[^>]*?href[\s]?=[\s\"\']*(.*?)[\"\']*.*?>([^<]+|.*?)?<\/a>
Description
This pattern is a slight modification in pattern submitted by Jacek Sompel. Using this tag one can also match anchor tags not having ' (single quote) or " (double quote) in href. This is useful for web crawler for crawling all links in a web page.
Matches
&lt;a href='http://www.regexlib.com'&gt;Text&lt;/a&gt; | &lt;a href="..."&gt;Text&lt;/a&gt; | &lt;a href=http://www.regexlib.com&gt;Text&lt;/a&gt;
Non-Matches
all other html tags
Author Rating: The rating for this expression. Kuleen Upadhyaya
   Displaying page 1 of 1 pages; Items 1 to 2

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