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 3
Title Test Details Manage img
Expression
<img[\s]+[^>]*?((alt*?[\s]?=[\s\"\']+(.*?)[\"\']+.*?)|(src*?[\s]?=[\s\"\']+(.*?)[\"\']+.*?))((src*?[\s]?=[\s\"\']+(.*?)[\"\']+.*?>)|(alt*?[\s]?=[\s\"\']+(.*?)[\"\']+.*?>)|>)
Description
This pattern can intercept img like < img src="src1" alt="alt1"> or < img alt="alt1" src="src1"> or < img src="src1"> or < img src="src1" width=3 height=4> then values of src can be found in $5 or $8, the value of tag alt can be found in $3 or $10.
Matches
< img src="src 1" alt="alt 1"> or < img src="src 2"> or < img src="src 3" alt="alt 3" width=2 height=3>
Non-Matches
any other tag
Author Rating: The rating for this expression. Cordisco Massimo
Title Test Details Grabbing title tag from web pages
Expression
<title>+(.*?)</title>
Description
This pattern could intercept the value of the tag title in every web pages, it could be found in $1.
Matches
<title>this title</title>
Non-Matches
any other tags
Author Rating: The rating for this expression. Cordisco Massimo
Title Test Details Grab tag meta from web pages
Expression
<meta[\s]+[^>]*?name[\s]?=[\s\"\']+(.*?)[\s\"\']+content[\s]?=[\s\"\']+(.*?)[\"\']+.*?>
Description
This pattern intercept meta tags, the name can be found in $1 the content value in $2.
Matches
<meta name="Author" content="xxxxxx"> <meta name="description" content="xxxxxxxxx"> <meta name="keywords" content="xxxxxxxxx"> <meta name="country" content="IT">
Non-Matches
any other tags
Author Rating: The rating for this expression. Cordisco Massimo
   Displaying page 1 of 1 pages; Items 1 to 3

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