Java String Split with Pipe Character Not Working - Solution






If you are working on Java, you might have run into this issue when you try to split a string based on a pipe character ("|"). It simply won't work. Split method in Java takes regex as an argument. There are certain characters including the pipe character which has special meaning in regex and are called meta characters. Here is a list of Java Regex meta characters


( ) [ ] { { \ ^ $ | ? *
Share on Google Plus

About Filegot

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment

Thank you for your comment