MentaRegex

Compare Revisions

Regard whitespace Rev 9 → Rev 10

/trunk/src/test/java/org/mentaregex/RegexTest.java
97,6 → 97,16
}
 
@Test
public void testSpecialCase() {
String s = "aaaaaa [tag]house[/tag] bbbbb [tag]home[/tag] cccccccccccc";
String[] m1 = Regex.match(s, "/\\[tag\\](.*?)\\[\\/tag\\]/");
assertEquals("house", m1[0]);
}
 
@Test
public void testSubstitution() {
 
assertEquals("sergioAApelaAA", sub("sergio33pela44", "s/\\d+/AA/gi"));