Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[HALP] Need some regex help...

... and google is not helping. Basically... I want to find the last occurence of border-radius: 0px; in a string and replace it with border-radius: 0px 0px 10px 10px; instead. This is for my power cards API script and I am banging my head on regex tutorials trying to figure this out.
And never mind... string.replace(/border-radius: 0px;(?!.*border-radius: 0px;)/g, 'border-radius: 0px 0px 10px 10px;') ... works! Just thought I'd post the solution I finally chanced upon after much googling.
thanks HoneyBadger, you are one caring Badger =)