Replace should be \U\0 of course. \L makes it lowercase. \U makes it uppercase.

[fletcher]


> On Mar 5, 2020, at 6:11 PM, Fletcher Sandbeck <[email protected]> wrote:
> 
> This seems to work. It's a little tricky to be sure you're at the start of a 
> sentence so I'd advice cycling through the matches rather than doing a global 
> replace.
> 
> Search pattern: (?:^|\. +)[a-z]
> 
> Replace pattern: \L\0
> 
> Use with grep and case sensitive turned on. The search pattern finds either 
> the start of a line ^ or an escaped period followed by one or more spaces, 
> wrapped in (?: ) so they don't define a sub-pattern. Followed by the 
> lowercase character. The replacement uses \U to make the replacement 
> uppercase. And we replace the whole pattern so we don't lose the period.
> 
> Hope this helps,
> 
> [fletcher]
> 
> 
>> On Mar 5, 2020, at 5:38 PM, Linton Hutchinson <[email protected]> wrote:
>> 
>> How do I 
>> Changing a lower case letter of the first word in a sentence to uppercase 
>> letter of the first word in the sentence for all entries in a txt file
>> 
>> using GREP?
>> 
>> -- 
>> This is the BBEdit Talk public discussion group. If you have a feature 
>> request or need technical support, please email "[email protected]" 
>> rather than posting here. Follow @bbedit on Twitter: 
>> <https://twitter.com/bbedit>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "BBEdit Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/bbedit/125e2ff6-7324-4778-9db9-ed75f11f36df%40googlegroups.com.
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "[email protected]" 
> rather than posting here. Follow @bbedit on Twitter: 
> <https://twitter.com/bbedit>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/440509A6-AAC4-4F56-B99D-93829D521685%40cumuli.com.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/3159614F-A0BA-4D22-BB6B-EEF182160789%40cumuli.com.

Reply via email to