Copy link to clipboard
Copied
Does anyone know how to use greph styles to find and remove text like this "Sample Size by Region" from a sentence like this (n=291; Table 4. Sample Size by Region)?
The goal is to have the sentence look like this. (n=291; Table 4.)
[Greph changed to Grep in title by moderator]
(¨/)
Copy link to clipboard
Copied
Hi v's question​,
sorry, but there is no way to remove this part with a grep style. You could "hide" this part with a character format, but the text is still in your document.
The only way to remove – use (text find and replace or) grep find and replace instead.
Have fun
Copy link to clipboard
Copied
Darn it ! That means I have hours and hours of work ahead of me then....Thank you.
Copy link to clipboard
Copied
https://forums.adobe.com/people/v%27s+question schrieb
… That means I have hours and hours of work ahead of me then …
No. Why?
Copy link to clipboard
Copied
… There's no "Greph" Find/Replace on my ID version, only a "Grep" one! Fuc…!
(^/)
Copy link to clipboard
Copied
Find and replace would work but, I don't know what the grep codes is to make it work
Copy link to clipboard
Copied
If you want us to help you, you need to be clearer!
(^/)
Copy link to clipboard
Copied
Okay, let me try to explain clearer.
Sample Text:
(n=331; Table 1. Sample Size by Region)
(n=342; Table 2. Sample Depart Station by Region)
(n=237; Table 3. Sample Income by Region)
(n=291; Table 4. Sample Income by Sex)
(n=128; Table 5. Sample Destination by Location)
(n=324; Table 6. Sample Age of Rider)
(n=126; Table 7. Sample Size by Size)
Need Text to be like this:
(n=331; Table 1.)
(n=342; Table 2.)
(n=237; Table 3.)
(n=291; Table 4.)
(n=128; Table 5.)
(n=324; Table 6.)
(n=126; Table 7.)
Any idea what that grep code would be so I can find the "Sample Text" and replace with "Need text to be like this"?
Copy link to clipboard
Copied
Thats simple
text search:
^wSample Size by Region
replace with:
[let this field empty]
or
grep search:
\sSample Size by Region
replace with:
[let this field empty]
Copy link to clipboard
Copied
Pixxxel,
More precisely:
\(n=\d+;\hTable\h\d+\.\K.+?(?=\))
(^/)
Copy link to clipboard
Copied
Or
\d\.\K\sSample[^)]+(?=\))
Have fun
Copy link to clipboard
Copied
Sorry, I miss understood my client, they want it to be like this.
Need Text to be like this:
(Table 1.)
(Table 2.)
(Table 3.)
Copy link to clipboard
Copied
\(\Kn=\d+;\h(Table\h\d+\.).+?(?=\))
$1
(^/)
Copy link to clipboard
Copied
… Or maybe:
(1.)
(2.)
(3.)
… now!
(^/)
Copy link to clipboard
Copied
Thank you, I see how this code does find the text but what do I put in the change field so that it just keeps the (Table #.)
Copy link to clipboard
Copied
(¨/)
Copy link to clipboard
Copied
OMG! You are a genius! Thank you sooooo much !
Copy link to clipboard
Copied
Always
(for Obis grep)
$1
Terrible. All of my answers are delayed because of "moderated".
Copy link to clipboard
Copied
Next time, I'll only watch the crime scene from the sandbox! I promise!
(^/)