public class RegexDistanceUtils extends Object
| Constructor and Description |
|---|
RegexDistanceUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getStandardDistance(String arg,
String regex)
Get the distance between the arg and the given regex.
|
public static int getStandardDistance(String arg, String regex)
Get the distance between the arg and the given regex. All operations (insertion/deletion/replacement) cost 1. There is no assumption on where and how the operations can be done (ie all sequences are valid).
Note that this quite expensive. If done too often, instrumentation can decide to rather compute a flag.Copyright © 2016–2024. All rights reserved.