If you use quotes, you’re asking for a regular expression split. |
is the “or” character, so your regex matches nothing or nothing. So everything is split.
If you use split('|')
or split("""\|""")
you should get what you want.
More Related Contents:
- How to split a string by a string in Scala
- Is there a function to split a string in PL/SQL?
- How to split a string into substrings of a given length? [duplicate]
- Does xslt have split() function?
- Scala String vs java.lang.String – type inference
- T-SQL Split Word into characters
- Is there a function to split a string in Oracle PL/SQL?
- Better String formatting in Scala
- Efficiently repeat a character/string n times in Scala
- What is the most efficient C++ method to split a string based on a particular delimiter similar to split method in python? [closed]
- How to split a String by space
- Parse usable Street Address, City, State, Zip from a string [closed]
- Splitting on comma outside quotes
- “The argument type ‘String?’ can’t be assigned to the parameter type ‘String'” when using stdin.readLineSync()
- Format a Go string without printing?
- How can I split a string with a string delimiter? [duplicate]
- C++/CLI Converting from System::String^ to std::string
- In Bash, how can I check if a string begins with some value?
- Making a string concatenation operator in R
- Bash: Split string into character array
- Splitting a string / number every Nth Character / Number?
- Product code looks like abcd2343, how to split by letters and numbers?
- Get last “column” after .str.split() operation on column in pandas DataFrame
- Split a string into an array of strings based on a delimiter
- Replacing characters in Ant property
- How do I convert a Vec to Vec?
- Split the string on forward slash
- How can I read a whole file into a string variable
- Flutter/Dart: Convert HEX color string to Color?
- Prolog getting head and tail of string