package dk.brics.automaton;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.junit.Assert;
import org.junit.Test;
@Test
Pattern p = Pattern.compile("a|ab");
Matcher m = p.matcher("ab");
Assert.assertTrue(m.matches());
}
@Test
RegExp re = new RegExp("a|ab");
RunAutomaton ra = new RunAutomaton(re.toAutomaton());
Assert.assertTrue(ra.run("ab"));
}
}