I am new to Java so spare me. Below you can see my code. What it should do is read the 3th column from text file and if this column is S**ei or P***ei it returns the first word in that line. However my question is "How can I make * match any character from a to z"?. I heard of regular expressions but haven't really worked with them yet. Any help would be much appreciated. Thanks.
package test;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
public class moja {
    public static void main(String[] args) {
        try {
            File file = new File("SloveneLexicon.txt");
            FileReader fileReader = new FileReader(file);
            BufferedReader bufferedReader = new BufferedReader(fileReader);
            StringBuffer stringBuffer = new StringBuffer();
            String vrstica;
            while ((vrstica = bufferedReader.readLine()) != null) {
                String s = vrstica;
                String[] dobi_besedo_v_vrstici = s.split("\\s+");
                String prva_beseda = dobi_besedo_v_vrstici[0];
                String tretja_beseda = dobi_besedo_v_vrstici[2];
                if (tretja_beseda =="S**ei"){
                    System.out.println(prva_beseda);
                    if (tretja_beseda =="P***ei")
                        System.out.println(prva_beseda);
                }
            }
            bufferedReader.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
 
     
     
     
    