How to remove text in brackets using a regular expression

后端 未结 3 1404
情深已故
情深已故 2020-12-18 20:36

I\'m looking for a regular expression which will perform the following:

INPUT: User Name (email@address.com)
OUTPUT: User Name

What would b

3条回答
  •  难免孤独
    2020-12-18 21:13

    I'm just offering another way to do this, although I would just use regex myself as this is clunky:

        string output = input.Split('(')[0].TrimEnd();
    

提交回复
热议问题