请解释这个Java正则表达式 [英] Please explain this Java regex
本文介绍了请解释这个Java正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我没有写下面的正则表达式,我试图找出它的作用。我知道它必须从策略映射开始,并且必须在策略映射和下一步之间至少有一个空格。但我一直试图找出括号内的东西意味着什么。我知道无论如何,它必须在行的末尾。
I didn't write the following regex, and I'm trying to figure out what it does. I know that it must begin with policy-map and must have at least one space between policy-map and whatever comes next. But I'm stuck trying to figure out what the stuff inside the parenthesis means. I know that whatever it is, it has to be at the end of the line.
^policy-map\\s+([\\x21-\\x7e]{1,40})$
谢谢!
推荐答案
范围从十六进制21到十六进制7e(基本上可打印,非空白ascii)1到40次。
characters in range from hex 21 to hex 7e (basically printable, non-whitespace ascii) 1 to 40 times.
这篇关于请解释这个Java正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文