Answer the question
In order to leave comments, you need to log in
How to get nick from "[id123|nick]" in js?
I just can't figure out how to get only nick from [id123|nick]
Answer the question
In order to leave comments, you need to log in
const result = str.match(/\[id\d+\|(.*?)\]/);
const nick = result[1];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question