i want to check in Adobe AIR if given regex is valid. I'm looking for somtehing similar like here: How to check if a given Regex is valid?
I dont want to compare regex and text-value - i jus want to check if this regex is valid. If someone type invalid regex - for example: "x{5,-3}" or "(((^^$$$)//)" or something like this i just need to communicate to him that this regular expression is not valid - its not proper regular expression.
In Java it can be done by: [code]
try {
Pattern.compile(userInputPattern);
} catch (PatternSyntaxException exception) {
System.err.println(exception.getDescription());
System.exit(1);
}
[/code]