Skip to main content
Jan 9, 2026 11:21 AM UTC
Answered

Search and replace by GREP - keeping original letters

Hi!
I have looked around in the community and found a few topics, which I must admit I did not understand. (I am far from "code wizard"...)
What I want to do is replace one or more characters etc, but keep others. I believe this can be done in GREP, but my attempts have been unsuccessful.
Example:
Search for "(any lowercase letter) (any uppercase letter)" - with a space in the middle.
Change to "(the found lowercase letter)./r(the found uppercase letter)" - thus insert a full stop and a new paragraph instead of the space, but keeping the two letters surrounding it.

a R
becomes
a.
R

Grateful for instructions. 🙏


FRIdNGE
FRIdNGECorrect answer
Jan 9, 2026 11:05 PM UTC

873740i88C159530B297D35.png

 

(^/)

4 replies

FRIdNGE
Jan 9, 2026 11:29 AM UTC

Find: (\l)\h(\u)

Replace by: $1.\r$2

 

(^/)  The Jedi

Translate
Jan 9, 2026 10:40 PM UTC

Thank you, especially for your quick reply.
Unfortunately, I only get the dollar sign, not the letter;

$1.
$2
Either typing "$1" or choosing "found1" - same result.

 

Translate
FRIdNGE
FRIdNGECorrect answer
Jan 9, 2026 11:05 PM UTC

873740i88C159530B297D35.png

 

(^/)

Translate