The pattern is from the following Snippet.
private static Pattern specialDoubleRegex = Pattern.compile("((-)?infinityd?)|(nand?)", Pattern.CASE_INSENSITIVE);
I am a beginner. I am starting to use Pattern class to write my own regex. I saw this example in the Java code example.I don’t completely understand them. Are we using special construct (?<name>X)
?
According to precious post and javase 7 docs, ?infinityd?) is not special construct here. what is (-)?infinityd?
about?
Can I say that they are the pattern looks like ((X)?XY?)|(X?)
pattern?