|
-
May 20th, 2011, 03:31 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Reg Ex to get anchor name
I have anchor tags which are unusually formatted.
I firstly I have tags which are as below <a name="1">text</a>
I need to get the value from the name attribute.
I then need to get the whole 1st part of the tag <a name="1"> so I can replace it with a properly formated tag i.e. <a href="URL" name="1">
I am a little lost in the world of Reg Ex and all the examples presume that there is a "href" followed by a formatted URL present.
String p18 = @"/<a[^>]*?name=[""""][^>]*?";
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|