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:
  1. import java.util.Arrays;
  2.  
  3. public class TestRegex {
  4.  
  5.     public static void main(String[] args) {
  6.         String errRecord = "1|20110226||||0|6068|6|33243.95|6062|35084323.55|0|0.00|0|0.00";
  7.         
  8.         String[] parts = errRecord.split("\\|");
  9.         
  10.         System.out.println(Arrays.asList(parts));
  11.     }
  12.  
  13. }
  14.  
© 2004-2019 by midrange.com generated in 0.006s valid xhtml & css