Copy link to clipboard
Copied
Hi,
I am new to GREP and cannot figure out how to make this work:
I scan some pages and often the same mistake occurs:
The scanner mistakes "1" for "I". (Capital i)
Where it shoud say "1. december" it says "I. december"
"10. januar" becomes "I0. januar"
"2014" becomes "20I4" - would be nice to make a GREP search here I think.
I hope that someone can help me.
Anita
Hi Mary,
It doesn't miss it: I don't try to treat it. I treat the 2 other cases. But I"ve seen a bug.
This treats all:
Search: (?<=\d)I|I(?=\d)|(?<=I)I|I(?=I)|I(?=\.)
Change to: 1
But you'll need to launch it 2 times! ![]()
Yours forget more if you want to treat, eg: I0I / 20II / 201,15 / II. / III …
I"ve not limited the research to the dates!
Copy link to clipboard
Copied
Hi,
As I suppose you want to do it at the beginning of your work, you need to go to the washing machine.
About the first problem, it's easy. The following are more interesting. I treat it as:
Search: (?<=\d)I+|I+(?=\d)
Replace by: 1
Difficult to find: "I've liked II with George Clooney!" ![]()
... but you can extend the research with a global grep style to find this type of occurrence.
Copy link to clipboard
Copied
Tried your example, Obi-wan, but it misses the first instance since there is no digit before "I. december".
Anita, try this and see if it works for you:
Find what: I((?=\.)|(?=\d))
Change to: 1
Copy link to clipboard
Copied
Hi Mary,
It doesn't miss it: I don't try to treat it. I treat the 2 other cases. But I"ve seen a bug.
This treats all:
Search: (?<=\d)I|I(?=\d)|(?<=I)I|I(?=I)|I(?=\.)
Change to: 1
But you'll need to launch it 2 times! ![]()
Yours forget more if you want to treat, eg: I0I / 20II / 201,15 / II. / III …
I"ve not limited the research to the dates!
Copy link to clipboard
Copied
Thanks Mary and Obi Wan,
I found that Obi Wan's search does the trick. Amazing - thanks a lot for your help.
Anita
Find more inspiration, events, and resources on the new Adobe Community
Explore Now