我试图掌握正则表达式语法。有谁知道我可以如何进行以下工作?
// if there is already a decimal place in the string ignore
String origString = txtDisplay.getText();
Pattern pattern = Pattern.compile("/\\./");
//pattern =
if(pattern.matcher(origString)){
System.out.println("DEBUG - HAS A DECIMAL IGNORE");
}
else{
System.out.println("DEBUG - No Decimal");
}