/    Sign up×
Community /Pin to ProfileBookmark

2 strings as 1 variable – Recognizing different names as equal

Hi, I have a js code that looks for duplicate names and replaces them with another random one, and it work well.

The problem I am having is that it does not recognize names that I consider to be the same, even though they are not.

Some names have numbers at the end and other issues, so I want to create a code where I can list all of the names that I consider to be the same under one variable and then it should work.

For example, can I assign names like Jones1, Jones2, JonesAR, to a variable like JONES, and they could all be equal?

Thanks

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogSep 09.2020 — > @javaman12#1623097 it does not recognize names that I consider to be the same

Sounds like the first thing to do is come up with a detailed definition of what you consider to be the same. Then you can consider one or more possible algorithms/techniques for detecting them. Are "richard", "richarda" the same? How about "richard" and "richardson"? Do upper-/lower-case matter? Etc....
Copy linkTweet thisAlerts:
@VITSUSASep 10.2020 — @javaman12#1623097 I agree with NogDog, you should decribed with detail definition of what you consider to be the same.
×

Success!

Help @javaman12 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...