midrange.com code scratchpad |
Name:
Split example
|
Scriptlanguage:
Java
|
Tabwidth:
4
|
Date:
02/27/2011 05:31:55 pm
|
IP:
Logged
|
|
Description:
The user was to lazy to give a description
|
Code:
- import java.util.Arrays;
-
- public class TestRegex {
-
- public static void main(String[] args) {
- String errRecord = "1|20110226||||0|6068|6|33243.95|6062|35084323.55|0|0.00|0|0.00";
-
- String[] parts = errRecord.split("\\|");
-
- System.out.println(Arrays.asList(parts));
- }
-
- }
-
|
|
|