Jump to content

How to compare the comman characters in two strings


ruby_09

Recommended Posts

Hi ,

if I have

$s1 = "XYZ12301";

$s2 = "XYZ12350";

 

I want to compare the two till they are similar and split them at the character where they are different

so in this case  split  at        XYZ123  01

                                        XYZ123  50    i want 01 from s1 and 50 from s2  since "XYZ123" are common in both

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.