Java Ignore Case Pattern Construct


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  1. import java.util.regex.*;
  2. import java.util.*;
  3.  
  4. class PatternIgnoreCase{
  5. public static void main(String[] args){
  6. String s = "I am a JAVA Program.";
  7. System.out.println(Arrays.asList(s.split("(?i)java")));
  8. }
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.