17.2 (Java) Problem clarification

#1

I didn’t understand the problem requirement at all.
We already have a string and a given regular expression, we have to generate the closest match from that regular expression to the given string?
Like string=abba and pattern a(b{0,})a. In this case the closest match is abba with distance 0.
The way I’m feeling, this heads to A* search?

0 Likes

#2

The problem here is that regular expression has many different almost infinite combinations on that. So you need to find an algorithm to find the shortest edit distance to that.

0 Likes