0
I want to delete all characters except the last 3 letters that are uppercase. And another thing, like I do several regex together?
0
I want to delete all characters except the last 3 letters that are uppercase. And another thing, like I do several regex together?
0
The syntax depends on the regex implementation you are using. But an example using the js syntax:
str.replace(/^.*([A-Z])[^A-Z]*([A-Z])[^A-Z]*([A-Z])[^A-Z]*$/, '$1$2$3')
I think the parentheses within the group are wrong. I also believe that you wanted to put the quantifier 3 times after the parentheses, grouping uppercase letters etc. And I also believe that here you did not isolate the uppercase letters, I understood that the answer should return only the last 3 uppercase letters
This gives write code on mobile (and without testing) :D
Browser other questions tagged regex
You are not signed in. Login or sign up in order to post.
The theory of this question is relevant: https://answall.com/q/241285/64969 so you will know how to join regular expressions (mathematical flavor), and also how to compose what you need
– Jefferson Quesado
Could you explain better what you want to do? As well put several regex together?
– Victor Stafusa
Could complement with an example to avoid possible misinterpretations?
– Marcos Xavier
This can be done using
Wildcards
also, using aLike Operator
– danieltakeshi