62,621
社区成员
发帖
与我相关
我的任务
分享
public class TestRegular
{
public static void main(String[] args)
{
String currentLine = "namespace POA_circuitCutMgr";
if(currentLine.matches("\\bnamespace[ ]POA_.*"))//这加个")"
{
System.out.println("ok");
}
}
}
运行结果:
ok