Close popover
Pradeep Gunda (PradeepG8556)
American Express

American Express
PradeepG8556 Member since 2015 1 post
American Express
Posted: February 12, 2016
Last activity: February 15, 2016

Number of differences between two strings


We would like to restrict the user from modifying more than two letters of his full name.

E.g. The existing Full name is John Smith, and if the user would like to modify his name on the account he can change a max of two chars. (Including, updating, or adding)

Case 1: John SmithXX - Allowed - two additional chars
Case 2: JohnSmithXX - not allowed- removal of space and two additional chars, three changes
Case 3:John Smi-ALlowed two char removals
Case 4:John SmiXX Allowed two char modifiations, you get the point right.

Has anyone done this before, or is there any Java OOTB api or code snippet/reg expression we can use.

Thank you,

Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Discussion, please write a new Discussion.