Find Jobs
Hire Freelancers

REGEX pattern needed

$5-10 USD

Completed
Posted over 11 years ago

$5-10 USD

Paid on delivery
I need a preg_replace() pattern that can be used to solve the following problem. I have an image link that needs to be changed based on the name of the image. This url: [login to view URL]**03254395**_GAMLS-****.jpg is what we have to search for. The number portion of the url will be dynamic. The -0 will also be dynamic. It will be -0 or -1 etc based on how many images the home has. What I need is _**if the image name is a -0**_ meaning the first image, I need to change the url to the one below. [login to view URL]**03254395**[login to view URL] Notice other portions of the source and target urls are different. The paths are the same except the source has a folder named addl_picst and the target has that folder named images. Your deliverables will be a function I can pass a $content variable to that will spit back the content with the changed urls.
Project ID: 2777268

About the project

3 proposals
Remote project
Active 12 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.
$5 USD in 1 day
5.0 (96 reviews)
4.7
4.7
3 freelancers are bidding on average $6 USD for this job
User Avatar
See private message.
$6 USD in 1 day
4.9 (254 reviews)
5.9
5.9
User Avatar
See private message.
$7 USD in 1 day
4.9 (25 reviews)
3.7
3.7

About the client

Flag of UNITED STATES
Atlanta, United States
5.0
26
Payment method verified
Member since Aug 23, 2005

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.