protected void searchFilter(String s, int n)
{
RowFilter<MyTableModel, Object> rf = null;
try {
System.out.println(s);
rf = RowFilter.regexFilter(s, n);
} catch (PatternSyntaxException e) {
System.out.println(e);
}
filters.add(rf);
}
括弧を含むJTableの文字列を照合しようとしています。上記のコードでは、文字列パラメータは次のようになります。John(Smith)
そして、私が検索している列:
Jane (Doe)
John (Smith)
John (Smith)
Jack (Smith)
返却したい場所:
John (Smith)
John (Smith)
しかし、今は何も返されません。Matcher、Pattern、RowFilterのドキュメントを見てきましたが、これまでのところ何も役に立ちませんでした。