I have trouble with the split function in Java. When I try to split a string with a regex "$"
String line = "Vu Quang Huy$2/11/1999$Ha Noi$Nam$CNTT$1.2$12$10000.0";
String[] properties = line.split("$");
Run Code Online (Sandbox Code Playgroud)
It doesn't do any thing. The properties at index 0 is the same as the original string
System.out.println(properties[0]);
Run Code Online (Sandbox Code Playgroud)
And it shows
Vu Quang Huy$2/11/1999$Ha Noi$Nam$CNTT$1.2$12$10000.0
Run Code Online (Sandbox Code Playgroud)
Can anyone help me with this problem? Thanks in advance!