📜  正则表达式搜索所有数学运算符 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:23.600000             🧑  作者: Mango

代码示例1
[*+\/-]+|[A-Za-z]+

This will works. According to @CertainPerformance The performance of that 
should be fine. The problem is always when several branches of alternation 
start with matching the same content (like a*|aa*, for example). There is no 
possibility your two branches will ever both match on the same character, 
so that is as good as regex gets.

Also, thanks for your answer @revo.