Fixed the bug in InitRegex.java; should be working properly now.