Foro de elhacker.net

Programación => Java => Mensaje iniciado por: soy_nicanor en 12 Octubre 2016, 00:11 am



Título: deshabilitar expresion regular de filtro de jtable
Publicado por: soy_nicanor en 12 Octubre 2016, 00:11 am
Al buscar Expresiones regulares "+, *, ?" al filtrar datos de jtable me manda error

cuando busco juan + carlos no me encuentra el buscador
Código
  1. trsFiltro = new TableRowSorter<TableModel>(modelo);
  2. trsFiltro.setRowFilter(RowFilter.regexFilter("(?i)"+jTextField1.getText(), 3));
  3. jTable1.setRowSorter(trsFiltro);
  4.  

El error cuando busco +
Código
  1. Exception in thread "AWT-EventQueue-0" java.util.regex.PatternSyntaxException: Dangling meta character '+' near index 4
  2. (?i)+
  3.  
Como puedo deshabilitar expresion regular para que me funcione normal el buscador