Results 1 to 2 of 2
- 12-10-2011, 01:59 AM #1
Member
- Join Date
- Dec 2011
- Posts
- 1
- Rep Power
- 0
Help figuring out a regular expression!
I am writing a simple html parser (the HTML is in a one-line text file already on disk). After it reads the file, I'd like it to look for all instances of an anchor tag set which use a specific class (<a class="someClass"...).
Examples:
<a class="someClass" href="someURL1">SomeText1</a>
<a class="someClass" href="someURL2">SomeText2</a>
So the program will read the file, scan through it for all instances of anchor tags that start like this: <a class="someClass" and print out (to console) the plain text (SomeText1, SomeText2, etc.) found betwen the opening/closing anchor tags.
Would someone be able to figure out the regular expression to do this?
- 12-10-2011, 02:51 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,717
- Rep Power
- 16
Re: Help figuring out a regular expression!
Would someone be able to figure out the regular expression to do this?
Similar Threads
-
Regular Expression Help
By niketanand in forum Advanced JavaReplies: 1Last Post: 06-24-2011, 04:56 PM -
regular expression
By ehsansad in forum New To JavaReplies: 8Last Post: 03-18-2011, 02:23 PM -
regular expression
By prof.deedee in forum JDBCReplies: 3Last Post: 02-19-2010, 11:15 AM -
regular expression
By QkrspCmptPop in forum Advanced JavaReplies: 8Last Post: 01-20-2010, 03:55 AM -
regular expression
By ras_pari in forum Advanced JavaReplies: 27Last Post: 10-07-2009, 12:25 PM
Bookmarks