Regex - remove element

0

I want to delete all the characters except the last 3 letters that are capitalized. And another thing, how do I do several regex together?

    
asked by anonymous 11.10.2017 / 23:44

1 answer

0

The syntax depends on the regex implementation you are using. But an example using the syntax of js:

str.replace(/^.*([A-Z])[^A-Z]*([A-Z])[^A-Z]*([A-Z])[^A-Z]*$/, '$1$2$3')
    
11.10.2017 / 23:52