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 1
Title Test Details Pattern Title
Expression
\s(type|name|value)=(?:(\w+)|(?:"(.*?)")|(?:\'(.*)\'))
Description
Returns the three most important attributes from an HTML <input> tag: 'type', 'name' and 'value'. Supports attribute values that are double- or single-quoted or unquoted. Returns four references, the first being the name of the attribute, and the other three being the value, of which only one will be populated based on the way the value was quoted.
Matches
<input type="text" value='somevalue' name=fred>
Non-Matches
Any attributes that aren't "type", "name", or "value"
Author Rating: The rating for this expression. Carey Bishop
   Displaying page 1 of 1 pages; Items 1 to 1

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