I am new to regex and am having trouble making this work. The following line returns false but I think it should return true.
Pattern.matches("^DOI", "DOI 10.1364/OL.36.002946")
What I want is to match the first three letters "DOI", regardless of what comes after it. I try to remove the anchor but it still does not match. Can anyone help explain it for me?