put capital after a tag
-
@kat75
As is usually the case, supplying some real data would have helped clarify your situation, but I found that if I took this made-up data:
<h1>hello</h1> and <h1>there</h1> or <h1>kat75</h1>
I could change it with a Replace-All action into this:
<h1>Hello</h1> and <h1>There</h1> or <h1>Kat75</h1>
with this replacement:
Find-what:
<h1>(.)
Replace-with:<h1>\U\1
Search mode:☑ Regular expression -AND- ☐ . matches newlineThe key part here is obviously the \U (indicating what follows should be converted to uppercase) in the Replace-with.
-
thanks scott
it works fine
great thanks -
More information on these case conversions may be found here in the section on “Boost”.
-
Hello, @kat75, @scott-sumner and All
And if you want to normalize the text, between the starting and closing tag <h1>, in order to obtain :
-
A first capital letter
-
All the subsequent letters lower-case
Just use the regex, below :
SEARCH
(?-s)(?<=<h1>)(.)(.*?)(?=</h1>)REPLACE
\u\1\L\2For instance, the line :
<h1>sMalL</h1> <h1>tESt</h1>would be replaced, as below :
<h1>Small</h1> <h1>Test</h1>Remarks :
-
The replacement
\U\1\L\2could have been used, as well ! In fact, the next global case modifier\Lstops the previous case modifier action. -
Now, let’s suppose the replacement
\u$0OR\u\1\2. Then, only the first letter, of the text, would be changed upper-case. Similarly, the\lform changes the following single character lower-case. -
For an equivalent regex, using the form
\U, you would have needed the regex\U\1\E\2, because the syntax\E, when used in replacement, stops the global case modifiers\Land\U
Cheers,
guy038
-
-
thanks scott and guy
-
Hello
i have used with success
Find-what: >(.)
Replace-with: >\U\1
Search mode: ☑ Regular expression -AND- ☐ . matches newline
to put in uppercase all the letters after >i would now to put in uppercase all the letters after a . and a space
i have read the help but dont succeed
i have tried
Find-what: . (.)
Replace-with: . \U\1
Search mode: ☑ Regular expression -AND- ☐ . matches newlinebut not work
-
Hi, @pouemes44,
I supposed that it does not work because you forgot to escape the dot regex symbol, in the search part, in order that the regex engine looks for a literal dot character !
So, try this S/R, below :
SEARCH
(?-s)\.\x20(.)REPLACE
.\x20\U\1Click, either, on the Replace or Replace All button
Notes :
-
You may use, of course, a simple space character, instead of the
\x20syntax ! -
The
(?-s)modifier forces the regex engine to consider that the . matches newline option as to be disabled, even it’s checked, in the Find/Replace dialog !
An other form could be used :
SEARCH
(?-s)(?<=\.\x20).REPLACE
\U$0Notes :
-
This time, the regex searches a single standard character, ONLY IF it is preceded by a literal dot and a space character ( positive look-behind )
-
In replacement, the whole regex match (
$0), is just rewritten, in uppercase -
With that second S/R, you must, exclusively, use the Replace All button, although I don’t understand, clearly, the reason why :-))
Cheers,
guy038
-
-
thanks guy, with your explanations i continue to learn :-)
-
hello all
just another question
how to replace in uppercase all more special characters (accent, cyrillic, chinese, hindi etc)
by example é by É, б by Б etc
\U replace in uppercase only common letters
some ideas?
thanks -
Hi,
follow below steps
select all ctrl+A
select TextFx from the top Menu
then select TextFx Characters
then select Proper Case and it will change all first letters of every line to Upper CaseCheers,
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login