class RegexLineTokenizer extends AbstractLineTokenizer {

	private Pattern pattern;

	@Override
	protected List<String> doTokenize(String line) {<FILL_FUNCTION_BODY>}

	/**
	 * Sets the regex pattern to use.
	 * @param pattern Regular Expression pattern
	 */
	public void setPattern(Pattern pattern) {
		Assert.notNull(pattern, "a non-null pattern is required");
		this.pattern = pattern;
	}

	/**
	 * Sets the regular expression to use.
	 * @param regex regular expression (as a String)
	 */
	public void setRegex(String regex) {
		Assert.hasText(regex, "a valid regex is required");
		this.pattern = Pattern.compile(regex);
	}

}

		Matcher matcher = pattern.matcher(line);
		boolean matchFound = matcher.find();

		if (matchFound) {
			List<String> tokens = new ArrayList<>(matcher.groupCount());
			for (int i = 1; i <= matcher.groupCount(); i++) {
				tokens.add(matcher.group(i));
			}
			return tokens;
		}
		return Collections.emptyList();
	
<methods>public non-sealed void <init>() ,public boolean hasNames() ,public void setFieldSetFactory(org.springframework.batch.item.file.transform.FieldSetFactory) ,public transient void setNames(java.lang.String[]) ,public void setStrict(boolean) ,public org.springframework.batch.item.file.transform.FieldSet tokenize(java.lang.String) <variables>private final java.lang.String emptyToken,private org.springframework.batch.item.file.transform.FieldSetFactory fieldSetFactory,protected java.lang.String[] names,private boolean strict