Copy link to clipboard
Copied
What is the GREP code that I need that every fourth tab becomes the end of a sentence?
[Title edited for clarity by moderator: was "GREP"]
Both your screens seem identical...
whatever, this regex will pick up the every fourth tab:
Find what: ([^\t]+\t){3}[^\t]+\K\t
Change to: \r
Copy link to clipboard
Copied
for consecutives tabs without any character between them try this:
find:
(?<=\t{3})\t
change:
\r
Copy link to clipboard
Copied
If the tabs are actually consecutive, do you need GREP? Why not a simple text search for four Tabs and replace with Return?
Find: ^t^t^t^t
Replace with: ^p
Copy link to clipboard
Copied
perhaps because only the fourth tab needs to be replaced.
Copy link to clipboard
Copied
Yes, maybe.
But I was thinking maybe the tabs aren't actually consecutive as assumed in the first response. Maybe because I can't think of any scenario where I would want
"tab tab tab return"
all together at the end of a sentence, possibly forcing a new blank line.
Copy link to clipboard
Copied
now i'm wondering what 'end of a sentence' might specifically mean. four tabs becomes a full stop?
Copy link to clipboard
Copied
Maybe einats17068109 will come back and give us an example. There are several interpretations to this!
Copy link to clipboard
Copied
Hey,
I received a text from my client in Text without the end of a sentence.
Instead I have a number - tab - number - tab - number - tab - number -tab - number -tab.
I need that the fourth tab will be end Enter.
Copy link to clipboard
Copied
Both your screens seem identical...
whatever, this regex will pick up the every fourth tab:
Find what: ([^\t]+\t){3}[^\t]+\K\t
Change to: \r
Copy link to clipboard
Copied
Thank you
Copy link to clipboard
Copied
You're welcome.
Copy link to clipboard
Copied
Hi winterm,
What's \K for? i can't find a reference for it.
Copy link to clipboard
Copied
Hi,
The \K item is the variable-length lookbehind. It says "match everything before \K but don't capture it".
It was introduced in CS6.
Take a look here, from post 8, and further.
Copy link to clipboard
Copied
wow, nice. gonna have to remember that.
Copy link to clipboard
Copied
You're right,
Sorry, here it is