I have a string like 1264$LP@$JOHN TAYLOR VS NJ Traffic$LP@$0$LP@$. I want to split this string with $LP@$ as a delimiter but this contains L (in TAYLOR) so while it should return
1264
JOHN TAYLOR VS NJ Traffic
0
it is giving like
1264
JOHN TAY
OR VS NJ Traffic
0
Could anybody help me? Thanks in advance.
The $ symbol is special character in regular expression. You need to escape it using ‘\’.
Output is
1264
JOHN TAYLOR VS NJ Traffic
0