469,625 Members | 1,813 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

Need help with regular expression

I need help design a reg exp.
I am parsing an html file to get the input values, here is one example

<input VALUE="Staff Writer" size=60 type="text" name="author">

Can I grab the value "Staff Writer" if name = "author"? is it possible using
regexp?

Thanks
Nov 21 '05 #1
2 1428
The following sites provide a wealth of information on regular expressions.

A tutorial & reference on using regular expressions:
http://www.regular-expressions.info/

The MSDN's documentation on regular expressions:
http://msdn.microsoft.com/library/de...geElements.asp

Instead of writing your own parser or using RegEx, have you considered using
a SgmlReader (HTML reader)?

http://www.gotdotnet.com/Community/U...4-C3BD760564BC

Hope this helps
Jay
"news.microsoft.com" <fa****@managepoint.net> wrote in message
news:ex**************@TK2MSFTNGP12.phx.gbl...
I need help design a reg exp.
I am parsing an html file to get the input values, here is one example

<input VALUE="Staff Writer" size=60 type="text" name="author">

Can I grab the value "Staff Writer" if name = "author"? is it possible
using
regexp?

Thanks

Nov 21 '05 #2
Thanks for the links. Now I can get most of the information except for one
thing. There is a <textarea> tag anding with </textarea> and I am trying to
capture the text between these two tags and I am not getting it. Could it be
becuase of new line characters?
Here is my regex string
textarea.*name=""text"" cols=60>(?:""(?<1>[^""]*)""|(?<1>\S+)).*<textarea>

Thanks
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:ej****************@TK2MSFTNGP09.phx.gbl...
The following sites provide a wealth of information on regular expressions.
A tutorial & reference on using regular expressions:
http://www.regular-expressions.info/

The MSDN's documentation on regular expressions:
http://msdn.microsoft.com/library/de...geElements.asp
Instead of writing your own parser or using RegEx, have you considered using a SgmlReader (HTML reader)?

http://www.gotdotnet.com/Community/U...4-C3BD760564BC
Hope this helps
Jay
"news.microsoft.com" <fa****@managepoint.net> wrote in message
news:ex**************@TK2MSFTNGP12.phx.gbl...
I need help design a reg exp.
I am parsing an html file to get the input values, here is one example

<input VALUE="Staff Writer" size=60 type="text" name="author">

Can I grab the value "Staff Writer" if name = "author"? is it possible
using
regexp?

Thanks


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mike Andrews | last post: by
4 posts views Thread by Neri | last post: by
18 posts views Thread by Q. John Chen | last post: by
3 posts views Thread by Lucky | last post: by
17 posts views Thread by Mark | last post: by
14 posts views Thread by Chris | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.