Is there a way to take a Home Depot URL like this:
...and remove everything between "p/" and the final "/" to return this:
Is there a way to take a Home Depot URL like this:
...and remove everything between "p/" and the final "/" to return this:
This should work:
The find line: ^(.*?\/p).*\/?(\/.*)$
The replace line: $1$2
The example assumes you have the URL in a variable, but you could easily change it to work off clipboard, etc.
-rob.
That works perfectly - thank you!
and another approach is to refer to the parts of the URL which we want to drop or keep by their numeric index.
( splitting on "/" )
Parts of URL dropped by numeric index.kmmacros (3.5 KB)
For a subroutine to generalise variable array slices, see:
Awesome - thanks ComplexPoint!