Jump to content

Recommended Posts

Hi - I am way out of my league here. If you are willing to help I appreciate it. I will pay a little $ for your help as well - email me at [email protected] with how much and I will let you know. Here is the question:

 

I have strings like this in a field:

BASE;Price-$231;231.00

 

And I need the string returned with only the amount AFTER the LAST semi-colon. i.e:

231.00

 

Your help is GREATLY appreciated!

 

Link to comment
https://forums.phpfreaks.com/topic/130283-preg_replace-help-needed-for-wildcard/
Share on other sites

Yeah $string is just example of what you showed.  It doesn't matter what the price is.  Code explodes at the semicolons and grabs the last value in the exploded array, so assuming that the actual format of the string stays the same (semicolon followed by value), you should get what you need.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.