There are many websites which take a string as user input and allow you to create a regular expression (regex) from pieces of the string.
But I could not find any java library which does the same. Is there any Java library available which generates a regular expression that exactly matches a string?
String inputString = "ABC345";
String regularExpression = Something.generateRegEx(inputString);
or something like that.
Note: I have a condition wherein I want to take some string from user, generate regular expression and then match for that pattern on some data-sets to extract similar patterns. I have created a small utility, but it is not that reliable yet. Moreover, I am looking for some well-tested library.
EDIT :
Please visit txt2re.com. I want a java library which performs the same function.