Beginning letter replacing
-
Is it possible to replace a beginning letter without changing a whole word?
“L-i don’t know” is a common OCR error, so I need that to be “I-i don’t know”
Problem is, there are names, words like “CARL- Hey”, so I would need an expression to only affect “L-” but not the letters before it. -
find : (?<=[\s(\r\n)])[lL]
replace with what you want
search mode : regular expression
this will find any l capital or small in the beginning of any wordfind : (?<=[\s(\r\n)])(l-)|(L-)
replace with what you want
search mode : regular expression
this will find any l capital or small that follow by - -
Why not just find on
\bL
?I hesitated to reply earlier to the OP because from the problem description I wasn’t quite sure what exactly was being asked for.
-
Abed- I tried your solution. It does change L- to I- but it also changes CARL- to CARI-
-
@kracovwolf can you describe your problem with more details?
so you want to change L- to I- in beginning only ? if so use the first regex it works only if the L in the beginning -
@Alan-Kilborn i notice that \bl match also if before the word was : or ;
-
-
@Abed99 said in Beginning letter replacing:
i notice that \bl match also if before the word was : or ;
Yea, well, same old problem here, happens time and time again…
People don’t know enough (to ask their question correctly) about the information required to derive the proper answer. -
This post is deleted! -
Yes I mean the first letter of the whole line. Your first expression doesn’t seem to work
\bl is the one that works, thanks
-
I tried tweaking this since I found ones that begin with “L…”, so I tried \bL… but I didn’t realize that the periods act as wildcards so they changed all characters to periods. It changed “Well I can” to “Wel… I can” so obviously my tweak isn’t any good. If anyone has a solution let me know.