我需要更换尖括号外的所有内容
示例 输入字符串:
hello <how> are you <I'm fine> thanks. <what "about" you>, I'm fine as well thank you.
输出字符串:
* <how> * * <I'm fine> *. <what "about" you>, * * * * * *.
答案 0 :(得分:4)
由于语言/工具未知,您可以尝试:
search: ((?:<[^>]*>|[.,\s])*)[^\s,.<]+((?:<[^>]*>|[.,\s])*)
replace: $1*$2