private static Pattern createCombinedPattern(List<RegexRule> rules) {
		// Dummy pattern
		if (rules.isEmpty()) return RegexUtil.pattern("({EMPTY}EMPTY)");
		StringBuilder sb = new StringBuilder();
		for (RegexRule rule : rules) {
			String pattern = rule.regex();
			sb.append("({").append(rule.name()).append("}").append(pattern).append(")|");
		}
		return RegexUtil.pattern(sb.substring(0, sb.length() - 1));
	}
@param rules
		Rules to match against.

@return Compiled regex pattern from the given rules.
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/syntax/RegexSyntaxHighlighter.java