# Fuzzy Matching
If enabled in awsume's global config, awsume will attempt to fuzzy match your profile name to an available profile if the given profile name is not found.
There are three methods used to match a profile name to a given profile (in order):
- Prefix Match
- Longest Contains
- Levenshtein Distance
For each method, if there is one closest profile, that is the profile that will be chosen. If there is a tie for which profile is closest, no profile will be returned.
# Prefix Match
Compare the given profile name to each profile as if it was the prefix.
For example, if these are your profiles:
dev-readonly
dev-admin
dev-awould match to thedev-adminprofiledevwould not match to any profile
# Longest Contains
Compare the longest common sequence of characters between the given profile name and each profile.
For example, if these are your profiles:
hello-dev-readonly
goodbye-dev-readonly
dev-readonlywould not match to any profilebye-dev-readwould match to thegoodbye-dev-readonlyprofile
# Levenshtein Distance
Compare the given profile name to each profile with the levenshtein distance (opens new window). This is useful mainly for small typos.
For example, if these are your profiles:
dev-readonly
dev-admin
profile1
profile2
dev-admibwould match todev-adminprofilewould not match to any, since the levenshtein distance between bothprofile1andprofile2and the givenprofileis the same