PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Sep 22, 2019 9:07 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: regex code advice
PostPosted: Fri Feb 27, 2015 11:15 am 
Offline
Forum Newbie

Joined: Fri Feb 27, 2015 11:12 am
Posts: 2
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="http://www.anythingText.com" 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?


Top
 Profile  
 
 Post subject: Re: regex code advice
PostPosted: Fri Feb 27, 2015 4:52 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6617
Location: WA, USA


Top
 Profile  
 
 Post subject: Re: regex code advice
PostPosted: Tue Mar 03, 2015 7:37 am 
Offline
Forum Newbie

Joined: Fri Feb 27, 2015 11:12 am
Posts: 2
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


Top
 Profile  
 
 Post subject: Re: regex code advice
PostPosted: Tue Mar 03, 2015 4:00 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6617
Location: WA, USA


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group