Eddie Shipman
asked on
Need regex to use in replace()
I've got some strings that look like this:
Result should be
Can't use this:
Baby & Toddler > Baby Safety > ...
I want to take off the trialing
> ...
Result should be
Baby & Toddler > Baby Safety
Can't use this:
str.replace(" > ...", "", str);
I get an error: "invalid regular expression flag A" (in Firebug)ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
my test page ?
ASKER
ASKER
Firefox 3.6.10
ASKER
You forgot to click the '...' in the second dropdown that contains baby Monitors. Do that and see if it still works for you.
If you select anything but the '...' in the last one, it doesn't append the ' > ...'
If you select anything but the '...' in the last one, it doesn't append the ' > ...'
ASKER
Not using IE7... Did you actually CLICK on the ... in the second dropdown?
Image1.png
Image1.png
ASKER
Fixed it...
Modified the .each function to not add the item if it's text = '...' like this:
Modified the .each function to not add the item if it's text = '...' like this:
.each(function() {
if($(this).text() != '...') {
labels.push($(this).text());
}
}); // .each
ASKER
Now, I don't even need the replace...
lol OK
ASKER
I'm giving you the points anyway.
This taxonomy is for an e-comemrce package to handle exports of their products to import into GoogleBase.
GoogleBase is the "store" for Google Checkout. You can import your products directly into it and sell from their store.
This taxonomy is for an e-comemrce package to handle exports of their products to import into GoogleBase.
GoogleBase is the "store" for Google Checkout. You can import your products directly into it and sell from their store.
Good to know! Thanks a lot for the points! Have fun!
ASKER