Regex creation and test