1
我在模塊的服務器文件夾中有以下一段代碼。正則表達式類不工作在服務器端的GWT
Pattern regex = Pattern.compile("/(B[A-Z0-9]{9})/");
Matcher matcher = regex.matcher(detailPageUrl);
但我仍然得到以下錯誤:
[ERROR] Line 14: The import java.util.regex cannot be resolved
[ERROR] Line 15: The import java.util.regex cannot be resolved
[ERROR] Line 202: Pattern cannot be resolved to a type
[ERROR] Line 202: Pattern cannot be resolved
[ERROR] Line 203: Matcher cannot be resolved to a type
我的代碼進口
import java.util.regex.Matcher;
import java.util.regex.Pattern;
。
我認爲Regex將在服務器端工作。爲什麼這不起作用?
發佈您的文件夾結構。 「服務器」上的代碼究竟是什麼? – Strelok 2010-07-28 23:46:28