you can add comment in my project and you can reply my comment. I wanna the take name and surname after "@". How can i do ?
My find username function
const findUsername = message => {
var attachements = message.match(/@[^\s]+/g);
console.log(attachements);
return attachements !== null
? attachements.map(item => item).join('')
: null; };
this function just take the name, example: "@John Dao", function take the John. Anybody help me ?
Comment Example: Comment
Reply Example: Reply Example
Message argument example : "@Berkay Ergün skajjkdalskjdadsa"
message.match(/@(\S+)\s+(\S+)/);
? - Wiktor Stribiżewmessage.split('@')
- Mohit Sharma