String splitString = "122$23$56$rt";
for(int i=0;i<splitString.length;i++){
System.out.println("Now you GOT this :: "+split(Pattern.quote("$")));
}
There are 12 characters with special meanings: the backslash \, the caret ^, the dollar sign $, the period or dot ., the vertical bar or pipe symbol |, the question mark ?, the asterisk or star *, the plus sign +, the opening parenthesis (, the closing parenthesis ), and the opening square bracket [, the opening curly brace {, These special characters are often called "metacharacters".
So your $
is also metacharacter
as defination says so you can't split using simple function. Though you must use pattern
in this case.
Thanks..