linux-正则表达式记录

Hanze | Aug 15, 2022 min read

匹配key=value:

(\w+)\s*:((?:\w+[-+*%])*?\w+)

匹配"key"=“value”

("?)\b(\w+)\1\s*:\s*("?)((?:\w+[-+*%])*?\w+)

匹配jdy server /.*pod="(jdy.*(?=-[\w]{9})).*/

comments powered by Disqus