Change first letter of a word to uppercase?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Beam4711
Posts: 10
Joined: Mon Sep 08, 2003 9:06 am

Change first letter of a word to uppercase?

Post by Beam4711 »

Hi there,

newbee question – sorry !

How can i search all words in a plaintext which begin with an letter in lowercase an change this first letter to uppercase. For example find in the text “house� and change it to “House�?

Thx for any help
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Use POSIX regular expression syntax:
Configuration | Preferences | Editor

[X] Use POSIX regular expression syntax
Then Search | Replace...
Find what: \<([a-z])
Replace with: \u\1

[X] Regular expression
Beam4711 wrote:Joined: 08 Sep 2003
...
newbee question
:-)
Beam4711
Posts: 10
Joined: Mon Sep 08, 2003 9:06 am

Post by Beam4711 »

Thats it Thanks for your help

-Beam
Beam4711
Posts: 10
Joined: Mon Sep 08, 2003 9:06 am

Post by Beam4711 »

Sorry – one more: After changing the first letters of the Words into Uppercase – I’ve got the next question. The Change produces a line (in German) like:

Er-[Linebreak]
Folgt

Now i need to find these occurrences an change it into

Er-[Linebreak]
folgt

Which means that the first letter of the 2nd line is changed lower case.

I search with ([a-z])-\n([A-Z]) this works, but how is the replace with expression?
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Find what: ([a-z])-\n([A-Z])
Replace with: \1\n\l\2
You can't put the \n inside the parentheses in the regular expression. This is a restriction in TextPad (but not in WildEdit).
Beam4711
Posts: 10
Joined: Mon Sep 08, 2003 9:06 am

Post by Beam4711 »

Great help – Great Tool.

I ´ve changed about 17.000 Items in a few seconds. You saved me weekend – Thanks!

- Beam
Post Reply