How does one translate a string literal into a regular expression? October 15, 2012
The Scenario
You want users to search through a very large database of strings. Your user has located an interesting substring. They want to locate other strings in your database that include similar substrings, where “similar” is a very user-specific notion. However, they have no idea what the integer is.
Let us assume that if you were able to compute a similar substring.
Input: hello world 123 Regular expression that matches user’s intention: hello w+ d+