On Apr 16, 5:08 pm, "shankwheat" <evanbu...@gmail.com> wrote:
> I have two strings that I need to compare and modify when there is a
> matching value in the two. If strA = '12937,' then I need to remove
> the value '12937,' from strB and the new value would be strB =
> '12931,12935'
>
> strA = '12937,'
>
> strB = '12931,12937,12935' (these could be any values in any order)
>
> I'm not sure where to begin on this.
>
> Thanks
Hi.
Try this:
strB = strB.replace(strA, "");
That will remove "all occurances" of strA from strB, and set the value
of strB to the value of strB with the specified string replaced. You
now have the logic, hopefully you can work with it.

Also, strA can
be substituted with a regex, and "" can be substituted with any
string, or even a function. Hope this helps.
All the best.
Daz.