Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let options = document.querySelectorAll('option');
- let optionRegx = /=\s(\d)$/;
- for(let o of options) {
- if(o.value && o.value.length > 0) {
- let matches = o.value.match(optionRegx);
- console.log(matches);
- if(matches && typeof matches[1] !== 'undefined') {
- o.value = matches[1];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement