Skip to content

Instantly share code, notes, and snippets.

@gmenard
gmenard / RegExConverter.java
Last active February 21, 2023 10:50
Convert regular expression from infix to postfix notation using Shunting-yard algorithm. Insert a '.' as explicit concatenation operator.
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Stack;
public class RegExConverter {
/** Operators precedence map. */