Dear all,
Here is my problem: I need to identify the identical part between two strings A and B.
Put in another way, I need to know how much first characters are identical between string A and string B.
The length of string A and of string B are variable. The length of the identical part is also variable.
There are no specific characters (like - or /) that I can use to try a regex match.
The only thing I know is that the identical part is necessary at the beginning (left) of the two strings.
For exemple:
comparing "ABC123" and "ABC234" must return "ABC"
comparing "ABCD" and "AD12" must return "A"
comparing "123" and "A123" must return Null
I can't figure out a solution...
Thank you so much for your help!