I have a string with type, the expected results are
input = "[Peter Jane Minesotta <[email protected]>]"
output
Fname = "Peter"
SecondAndRemainingNames = "Jane Minesotta"
email = "[email protected]"
input = "[Peter <[email protected]>]"
output
Fname = "Peter"
SecondAndRemainingNames = ""
email = "[email protected]
I need to extract using regex
I have tried with
input.match(/\w/gim)