I am using processing 1.0.6, which runs on java 1.6. I have the following code:
Pattern pattern = Pattern.compile("func\((.*),(\-?[0-9\.]*),(\-?[0-9\.]*),(\-?[0-9\.]*)\)");
but it gives the error:
unexpected char: '('
and highlights the line I pasted above. If I change the offending \(
to another character like #
, it complains of the \-
saying unexpected char: '-'
. I should be able to use literals in a regex engine and it works in C#!