Find Jobs
Hire Freelancers

C# Regex class with Timeout

$30-100 USD

Completed
Posted over 17 years ago

$30-100 USD

Paid on delivery
Hi we have an application that lets people provide a regular expression via an textbox and then processes some text using the C# regex class. The problem we have right now is that sometimes users can put in regex that take a long time and the app just hanges. We would as a result like to have a way to let a C# regex timeout. The deliverable for the project is a class called RegexWT. This class should have the same methods as Regex (and even possibly inherhit from Regex) save for that the worker methods like Match and Replace provide an addition long parameter called "timeout" which allows you to specify a timeout in milliseconds. In the event that the regex processing goes over the timeout, the call should return. The usage should be just like Regex: string regexstr = "[\\s*Mybadregex*;][1]"; RegexWT regexwt = new RegexWT(s, [login to view URL] | [login to view URL] | [login to view URL]); string temp = "Here is a string to parse"; temp = [login to view URL](temp, "", 30000); //times out after 30 seconds It would seem after some research that the way to accomplish this is to have something wrap regex and run asynch and then if the operation does not complete kill the thread. This technique is discussed here: <[login to view URL]> ## 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 .net 2.0 (vs2005) windows xp or better
Project ID: 3826093

About the project

6 proposals
Remote project
Active 18 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
Awarded to:
User Avatar
See private message.
$55.25 USD in 14 days
5.0 (7 reviews)
3.4
3.4
6 freelancers are bidding on average $61 USD for this job
User Avatar
See private message.
$25.50 USD in 14 days
5.0 (123 reviews)
5.7
5.7
User Avatar
See private message.
$58.65 USD in 14 days
5.0 (1 review)
0.8
0.8
User Avatar
See private message.
$68 USD in 14 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$85 USD in 14 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$76.50 USD in 14 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
United States
5.0
44
Payment method verified
Member since Jun 1, 2006

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) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
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.