[Solved] Trouble with regular expression

So I wrote what should be a simple regular expression. But for whatever reason it doesn’t work. .find() always says false.
Edit: The System.out.println("Scanned: "+line); returns the exact lines that are in the file, so it isn’t that the code can’t read it.

    public void fetchUndertaleData(){
        String name = System.getProperty("user.home");
        File file = new File(name+"/appdata/local/UNDERTALE/undertale.ini");
        
        String title = "";
        try(Scanner scan = new Scanner(file)){
            while(scan.hasNextLine()){
                String line = scan.nextLine().trim();

                System.out.println("Scanned: "+line);
                
                Matcher extractTitle = Pattern.compile("/^\\[(.*?)\\]$/").matcher(line);
                if(extractTitle.find()){
                    title = extractTitle.group(1)+".";
                    continue;
                }
                
                Matcher extract = Pattern.compile("/([a-zA-Z0-9]+)=\"(.*?)\"/").matcher(line);
                if(extract.find()){
                    String key = title+extract.group(1);
                    undertale.put(key.toLowerCase(), extract.group(2));
                    System.out.println("Register: "+key.toLowerCase()+" = "+extract.group(2));
                }
            }
            
            scan.close();
        }catch(Exception e){
            System.err.println("Error: "+e.getLocalizedMessage());
        }
        
        //Debug
        System.out.println(undertale.get("general.love"));    
    }

File I’m reading from

[quote][Mett]
O=“1.000000”
[Papyrus]
M1=“1.000000”
PS=“1.000000”
[Sans]
M1=“1.000000”
[Flowey]
Met1=“1.000000”
[reset]
reset=“1.000000”
[General]
Gameover=“1.000000”
fun=“9.000000”
Name=“null”
Love=“7.000000”
Time=“318297.000000”
Kills=“10.000000”
Room=“176.000000”
[Toriel]
Bscotch=“1.000000”
TS=“1.000000”
[/quote]

Remove those unnecessary slashes at the beginning and at the end of your regular expression.
Java regular expressions do not need to use such delimiters like you probably seen the Linux ‘sed’ tool use when delimiting the regular expression from the characters to replace it with.
Simply use a Java/Perl regular expression.

Thanks so much. I normally work with php and javascript, so that’s probably why I forgot.

IntelliJ lets you test regexps inline in the Java code editor, by the way.