PHP Developers Network

regex code advice
Page 1 of 1

Author:  sconard [ Fri Feb 27, 2015 11:15 am ]
Post subject:  regex code advice

I could not find the regex forum in the list so I am posting in scripting.

I am attempting to limit this to one match of the below.
Syntax: [ Download ] [ Hide ]
<a title="anythingText" href="" target="_blank"><img class="image" alt="Image" src="GetFile.aspx?Page=anythingText.anythingText&amp;File=anythingText.jpg"></a><p class="imagedescription">anythingText<br /></div><br /><br />anythingText<br /><br /><a title="anythingText" class="internallink" href="GetFile.aspx?Page=anythingText.anythingText&amp;File=anythingText.docx" target="_blank">anythingText</a>

This is what I have and it matches both anchor tags as one match.
Syntax: [ Download ] [ Hide ]
  1. (<a title="(.)*?" class="internallink" (target="_blank" )?href="GetFile\.aspx\?(Provider=((.)*?)&amp;)?Page=((.)+?)&amp;File=((.)+?)">)((.|\n|\r)+?)(</a>)) 

How can I separate?

Author:  requinix [ Fri Feb 27, 2015 4:52 pm ]
Post subject:  Re: regex code advice

Author:  sconard [ Tue Mar 03, 2015 7:37 am ]
Post subject:  Re: regex code advice

Existing code is in csharp.

Regex is used for many other matches so although I agree with you I still need to use regex.

Thank you

Author:  requinix [ Tue Mar 03, 2015 4:00 pm ]
Post subject:  Re: regex code advice

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group