I have a block of text that contains elements like:
@[30:Larry Peters]
Example: @[19:Sara Mas] what’s the latest with the TPS report? @[30:Larry Peters] can you help out here?
I had been using: /@\[\d+:\w+\s\w+\]/
Problem is I’ve found that only matches first and last name. And not:
- First name only
- First, middle and lastname
Is there a way to fix this regex to match any type of name, f, f+m, f+m+l ?
Thanks
Either allow multiple words:
/@\[\d+:\w+(\s\w+){0,2}\]/for up to threeor allow any amount of words and spaces:
/@\[\d+:[\w\s]+?\]/