Given the following example list of strings:
["ABC: {"UserName": "A111", "Something": "aaa"}",
"ABC: {"UserName": "A222", "Something": "bbb"}",
"ABC: {"UserName": "A333", "Something": "ccc"}"]
I would like to extract a list of substrings identical to all strings in the list (if exist), in series.
So in this example the output would be:
["ABC: {"UserName": "A",
", "Something": "",
""}"]
The input list of strings could be up to a few thousand, and the length of each could be up to 150K characters.
Special note: substrings must appear in the correct order. So if we had the following string in addition to the above:
"ABC: {"Something": "aaa, ""UserName": "A111"}"
The result should be substrings that exist in all strings, in order. So:
["ABC: {"]