Hi This is the first time a post a message here.
I'm looking for something which I assume is pretty easy to accomplish with GREP but I fail to see how. I have a large text file with entries sorted in this way: [image: tab1.png] That is, each line has two elements (represented here by A\d and B\d) separated by one tab character. The length of the two elements is between 1 and 100 characters each. Now I need a GREP Find/Replace string to make it look like this: [image: tab2.png] That is, the first element is replaced by a tab character *if* the first element is a repetition of the first element of the previous line(s). The sort order remains unchanged. Sounds simple. And yet all I manage to GREP for is this: [image: Screenshot 2021-03-20 at 12.26.11.png] The result looks promising but in now way satisfactory: [image: Screenshot 2021-03-20 at 12.22.46.png] The tab characters are inserted correctly, but the problem has to do with repetition ... Does anyone see how this can be resolved? Thanks samar -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "[email protected]" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/408db98a-d7c7-44b9-9689-ed8f9fe8b4d0n%40googlegroups.com.
