fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. import java.util.regex.*;
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. List<String> strs = Arrays.asList("aaaa_b", "zzzzzz_i", "---------_f", "TTTTT_dt", "..._.");
  13. for (String str : strs)
  14. System.out.println("\"" + str + "\": " + str.matches(".*(?<!_[bif]|_dt)"));
  15.  
  16. }
  17. }
Success #stdin #stdout 0.06s 27960KB
stdin
Standard input is empty
stdout
"aaaa_b": false
"zzzzzz_i": false
"---------_f": false
"TTTTT_dt": false
"..._.": true