Hi,
I'm having a problem with splitting a string with backslash. This code below is giving me the error "Exception in thread "main" java.util.regex.PatternSyntaxException: Unexpected internal error near index 1". Please assist. Thank you.
import java.io.*;
public class TestRegex
{
public static void main ( String args[] )
{
String testFilePath = new File( "" ).getAbsolutePath();
System.out.println( testFilePath );
File tempFile = new File( testFilePath );
String[] getFolder = testFilePath.split( "\\" ); // changing to other will work
for( int i = 0; i < getFolder.length; i++ )
{
System.out.println( getFolder[ i ] );
}
}
}