Jump to content
UBot Underground

Need Help Changing First Letter To Uppercase With Regex


Recommended Posts

Hello,

 

I would really appreciate for your help,

 

I need change uppercase with regex:

 

{word 1|word 2|word 3}. {word 4 |word 5 |word 6}

 

The regex should be:

(?<={)\w|(?<=\|)\w

 

But pls advise how to change all first letter to uppercase with regex?

 

Thanks very much,

Edited by huylinhn
Link to post
Share on other sites

try

clear all data
set(#Var1,"\{word 1|word 2|word 3\}. \{word 4 |word 5 |word 6\}","Global")
add list to list(%Words,$find regular expression(#Var1,"[\\w ]+"),"Delete","Global")
with each(%Words,#Var2) {
    if($comparison(#Var2,"!= Does not equal","")) {
        then {
            set(#Var1,$replace(#Var1,#Var2,$change text casing(#Var2,"Proper Case")),"Global")
        }
        else {
        }
    }
}
alert(#Var1)
  • Like 1
Link to post
Share on other sites

My current version's v5.8.5, not upgrade yet so i dont have with each command :(, any other method instead? Thanks

change to loop and next list

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...