Find Jobs
Hire Freelancers

Convert Java based Regex to PHP Regex and script

$30-250 USD

In Progress
Posted almost 10 years ago

$30-250 USD

Paid on delivery
I need to convert this java snip it of code that came from a .jar file to a php function with all regex. (Please see attached file). The java file basically compresses html code by removing unneeded tags, characters and white spaces. I need to convert all the java regex and/or functions to php regex. Some of it may already be compatible with php and some may not be. I'm looking for one simple function that does a preg_replace and utilizes all the regex in the attached java file. This job is a lot of copy and pasting and converting java regex to php compatible regex. If there are functions that have if statements for different tags, we just need to replace that with a regex that handles the process. The end product should be a simple php function like the one below with all the regex from the java file and converted for php. EXAMPLE: function html_compressor($html) { $search = array( 'regex', 'regex', ); $replace = array( '$1', '$1' ); $buffer = preg_replace($search, $replace, $html); return $html; } You should be able to pass html data through this function and you should be able to get 100% for the html minify section on [login to view URL] when scanning your html file/website. The html should still validate and work correctly. I can help by testing the function. please comment the code for each regex so I know what each one is responsible for. Skills needed: Java, php and regular expressions.
Project ID: 5925525

About the project

9 proposals
Remote project
Active 10 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

About the client

Flag of UNITED STATES
Oakland Park, United States
5.0
167
Payment method verified
Member since Dec 22, 2008

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.