Jump to content
UBot Underground

Recommended Posts

Hello all,

 

I try to replace the space only in Regex to ":"

 

Example:

Here is the whole sentence:

{top rated|major} {ten|10} kids Halloween costume

 

I would like it to be:

{top:rated|major} {ten|10} kids Halloween costume

 

I use find regular expression ({[a-zA-Z|].+})to select the sentence from the article

{top rated|major} {ten|10}

 

But, dont know how to just replace the space to ":" in the selection and then put it back to the original article.

 

The attachment is the ubot4 file I test.

Please help. Thanks a lot. :)

regex_sample.ubot

Link to post
Share on other sites

Use this regex string \s for spaces then replace it with : in replace regex expression.

 

How do I only select the spaces within { }?

I try to use \s but it selects all spaces in the article.

And, I cannot find the way to only select the spaces within { and }.

Thanks.

Link to post
Share on other sites
  • 7 months later...

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...