Jump to content

Recommended Posts

Hey, I'm not that great with String Replace or String Strip where the exact string is not known.


I need to be able to strip the following:


Where 2015 may not be known. I need to basically strip the side "*>  where * behaves like a wild card and leaves only the right side 2015.

Length will not be known. It will not always be numerical.

It may be " * > or < * > but I can set these for each column according to which way it is set up. 

Please help. Just need a basic understanding of how to identify and replace the pattern with ""


Link to post
Share on other sites

Can you provide some other examples of possible strings ?

If I understand, you want to keep only the last digits, am I right ?

$string = '"2015">2015'
$newstring = StringRegExpReplace($string, ".+?(\d+)$", "$1")


Link to post
Share on other sites

Thanks for your reply. Here are a few examples.

                                <span title="111">111

                                <span title="3.5L 6 cyl Fuel Injection">3.5L 6 cyl Fuel Injection

                                <span title="Ultra White">Ultra White

                                <span title="Black/garnet">Black/garnet

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...