Find Jobs
Hire Freelancers

Recursive balanced regex query needed...

$30-100 USD

Cancelled
Posted almost 17 years ago

$30-100 USD

Paid on delivery
I am trying to create a recursive balanced Regex query that will perform the following tasks: [Test Code] function test_func($test) { if ($this->test()) { return $test; } else { return false; } } ?> echo " "; ?> The first PHP block should be caught by the regex and captured as a match; additionally, the second code block should be captured as well even with the echoed php code block. Currently Im trying to accomplish this task with the following regex I found on google: <\?(?>[^<\?>]+|<\?(?)|\?>(?<-number>) )*(?(number)(?!))\?> This regex Im using will match the second code block perfectly but is failing to match and capture the first code block because I have "$this->test()" in the code and there is a "do not match on < or >" rule in the query. However it must match both example blocks perfectly, I just dont know how to change it to do so while still taking into account the tag balancing. Im doing this with C# in .NET 2.0. ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables): a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform Windows XP
Project ID: 2972028

About the project

2 proposals
Remote project
Active 17 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
2 freelancers are bidding on average $102 USD for this job
User Avatar
See private message.
$34 USD in 1 day
3.5 (6 reviews)
3.7
3.7
User Avatar
See private message.
$170 USD in 1 day
5.0 (5 reviews)
1.3
1.3

About the client

Flag of UNITED STATES
Hillsboro, United States
5.0
21
Member since Nov 9, 2004

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.