You have a multidimensional array where the elements’ keys/values are each on their own line.
You want to remove all elements that have the same key. In this case let’s lose the
'Key2' elements. In the Find and Replace dialogue box check “Use regular expression” and type
That’s it. Replace all.
\sis the character class of White Space (spaces and/or tab characters)
'Key2'is the Key and the double or single quote marks that wrap it
.*is for any number of characters (the dot for any character, the asterisk for any number of)
\nis for the line break
Then you might want to tidy up – but that’s easy too…
Now it’s all tidy again.
Leave a Reply