question: private String [ ] splitOutNag ( String wordToken ) { if ( wordToken . startsWith ( "$" ) ) { int digitEndIndex = 1 ; for ( int i = 1 ; i < wordToken . length ( ) ; i ++ ) { if ( ! Character . isDigit ( wordToken . charAt ( i ) ) ) { break ; } else { digitEndIndex ++ ; } } if ( digitEndIndex <= 1 ) { return null ; } else if ( wordToken . length ( ) == digitEndIndex ) { return new String [ ] { wordToken } ; } else { return new String [ ] { wordToken . substring ( 0 , digitEndIndex ) , wordToken . substring ( digitEndIndex , wordToken . length ( ) ) } ; } } return null ; }
target:  Returns null if wordToken isn't a nag. If word token is only a nag then a String[1] is returned where index 0 = wordToken. If word token starts with a nag then a String[2] is returned where 0=nag and 1 = rest of word. This method is fast and does'nt use REGEX for parsing.