[JS] I need help understanding this code.
I need help on specifically /(?<=\$\(CustomRank{Rank-Name: ).+?(?=}\))/g
I don't know what it is and how I can edit it to something different but with similar function.
let chatmsg = 'MisledWater79 "$(CustomRank{Rank-Name: CDT})' console.log(chatmsg.match(/(?<=\$\(CustomRank{Rank-Name: ).+?(?=}\))/g))
Voters
Coder100
That's regex. You can use regexr to parse it to explain it to you.
It will return what is in bold: (**CDT**
)
MisledWater79 "$(CustomRank{Rank-Name: **CDT**})
First, it checks if there is a $(CustomRank{Rank-Name:
. Then, it will match whatever is inside the curly braces. That's it!
InvisibleOne
I believe that is regex, but idk what isn't doing
It is a JavaScript regex (regular expression). Here's the breakdown:
Mark if helped!