JavaScript – Id’s have to be extracted from strings of format…


Id’s have to be extracted from strings of format ‘[id] <email>’.

In order to perform the above operations optimally, which of the below three regular expression would you use?

  1. /.*\[+(.*)+\].*/
  2. /\[([^\]]+)\].*/
  3. /\[([^\]]+)\]/

Related Posts

Close Bitnami banner
Bitnami