Some Regular Expressions for Java
If you need to find text lines that start with an alphanumeric characters:
String reg ="\\w+";
In other words, an alphanumeric character that gets repeated 1 or more times.
To find text lines that start with a whitespace and contain other characters after it, use the following regex:
String reg = "\\s.+";
That is, first find a whitespace, then any character repeated 1 or more times.