package org.bench4q.agent.test.scenario.utils;

import static org.junit.Assert.*;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.junit.Test;

public class Test_RegularExpression {
	String regex1 = "(?i)((^[aeiou])|(\\s+[aeiou]))\\w+?[aeiou]\\b";
	String regex2 = "(?i)\\w+?[aeiou]";
	String regex3 = "(?i)(\\s+[aeiou])\\w+?[aeiou]\b";
	String regex4 = "(?i)(^[aeiou])\\w+?[aeiou]\b";
	String target1 = "Arline ate eight apples and one orange while anita hadn't any";
	String target2 = "Arline ate";

	@Test
	public void test() {

		Pattern pattern = Pattern.compile(regex2);
		Matcher matcher = pattern.matcher(target1);
		System.out.println(matcher.matches());
		matcher.reset();
		while (matcher.find()) {
			System.out.println(matcher.group());
		}
		assertTrue(true);
	}
}
