Skip to main content
January 9, 2026
Answered

Search and replace by GREP - keeping original letters

  • January 9, 2026
  • 4 replies
  • 202 views

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. 🙏


Correct answer FRIdNGE

873740i88C159530B297D35.png

 

(^/)

4 replies

FRIdNGE
January 9, 2026

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

Replace by: $1.\r$2

 

(^/)  The Jedi

January 9, 2026

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.

 

FRIdNGE
FRIdNGECorrect answer
January 9, 2026

873740i88C159530B297D35.png

 

(^/)