Jump to content



Photo

How To Add Spaces After The Numbers


  • Please log in to reply
2 replies to this topic

#1 CryptoBot

CryptoBot

    Newbie

  • Members
  • Pip
  • 7 posts
  • OS:Windows 10
  • Total Memory:< 1Gb
  • Framework:v3.5
  • License:Developer Edition

Posted 12 August 2019 - 11:05 PM

Hi All,

 

I have this text scraped from a webpage "4Hours47Minutes23Seconds", and I wanted to put a space at the end of each number. So far I am only able to group them like this  (\d{1,2}.{1,5})+(\d{1,2}.{1,7})+(\d{1,2}.{1,7}). Which outputs :
 

4Hours
47Minutes
23Seconds

 

My question is, how do I perform the adding of this space character? Output should be 4 Hours 47 Minutes 23 Seconds.

 

 

Thanks!


Edited by CryptoBot, 12 August 2019 - 11:29 PM.


#2 pash

pash

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 3349 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 13 August 2019 - 04:26 AM

try

 alert($replace("4Hours","Hours"," Hours"))

New Plugin:: Advanced Facebook | Advanced Connection | Advanced Twitter | Advanced Email | Advanced PowerPoint
- Advanced Data Text File | Advanced DateTime | Advanced Dialog | Advanced Document | Advanced Google Blogger V3 | Advanced Google Drive | Advanced Google YouTube V3 | Advanced Image | Advanced Video | Advanced Screen and Windows | Advanced Systems | Advanced Ubot 1 | Advanced Ubot 2 | Advanced WordPress | Advanced Connection | Advanced Twitter | Advanced Email | Advanced PowerPoint

- Advanced Captcha (V3) | Advanced Captcha (V2) (Old) | Create Table From Excel (Lite) | Check Conection | Ubot Enter License | Auto Free Memory
- Working hours GMT+7. i regret sometimes the answer is delayed due to health problems.


#3 bestmacros

bestmacros

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 419 posts
  • LocationIsrael
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 13 August 2019 - 09:37 AM

set(#n,"4Hours47Minutes23Seconds","Global")
set(#n,$replace(#n,"Hours"," Hours "),"Global")
set(#n,$replace(#n,"Minutes"," Minutes "),"Global")
set(#n,$replace(#n,"Seconds"," Seconds"),"Global")
alert(#n)

bestmacros.jpg





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users