- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Pattern Title
<input[^>]*?value[/s]*=[/s]*(['|"])(.*?)\1[^>]*?type[/s]*=[/s]*(['|"]?)text\3[^>]*?> A pair of reg ex's to capture the value from an <input type=text> - depending on whether the type or value is listed first in the tag. For some reason, when I combine them as a []|[] form regex, they don't work at all any more. The font on this site doesn't show the difference, but the last matching expression has a " character, the last non-matching one has two ' characters. The last non-matching exp matches (with the typo in value fixed), but doesn't return the value correctly, any help with that would be appreciated. (this is my first commercially-used regex... I'm new to this still)
<input type=text value="qwerty"> | <input type="text" value='qwerty' &g
<input type=text value=qwerty> | <input type=button value="ClickMe"> | <inp
Author Rating: Not yet rated. Richard Hensman
Your Rating
Bad Good

Enter New Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2018, | ASP.NET Tutorials