Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
stringA或stringB的Java Reg Ex模式_Java_Regex - Fatal编程技术网

stringA或stringB的Java Reg Ex模式

stringA或stringB的Java Reg Ex模式,java,regex,Java,Regex,所以我知道java中正则表达式的模式编译有或字符语句,比如[abc]的意思是“a”或“b”或“c”,但有什么说法吗 “helloWorld”还是“再见每个人” 事先非常感谢。是的。正则表达式应该是“helloWorld | GoodbyeeEveryone” |符号基本上是regex中的“or”操作符如何知道字符类是什么而不是交替?我认为《初学者指南》中“交替”出现在角色课之前。

所以我知道java中正则表达式的模式编译有或字符语句,比如[abc]的意思是“a”或“b”或“c”,但有什么说法吗

“helloWorld”还是“再见每个人”


事先非常感谢。

是的。正则表达式应该是“helloWorld | GoodbyeeEveryone”


|
符号基本上是regex中的“or”操作符

如何知道字符类是什么而不是交替?我认为《初学者指南》中“交替”出现在角色课之前。