I am trying to write a regex pattern that matches any sentence that starts with several or one tab and / or space. For example, I want my regex pattern to match "hello, I like regex!". but I scratch my head how to combine words after "hello". So far I have this:
String REGEX = "(?s)(\\p{Blank}+)([az][ ])*"; Pattern PATTERN = Pattern.compile(REGEX); Matcher m = PATTERN.matcher(" asdsada adf adfah."); if (m.matches()) { System.out.println("hurray!"); }
Any help would be greatly appreciated. Thanks.
source share