如何从java正则表达式中的点(。)字符类中排除字符? [重复]

时间:2022-11-07 00:11:45

This question already has an answer here:

这个问题在这里已有答案:

I want to exclude '<' from the dot (.) (which includes all printable character) character class in java regex. How can I do it?

我想从java正则表达式中的点(。)(包括所有可打印字符)字符类中排除'<'。我该怎么做?

1 个解决方案

#1


0  

You can do regex with except < character:

您可以使用除 之外的正则表达式:

[^<]+

#1


0  

You can do regex with except < character:

您可以使用除 之外的正则表达式:

[^<]+