+ 2

Regular Expression! Help me.

Could someone help me about this? I want to use Regex. Ex: 'thisismyregex' ---> 'this is my regex' or 'ThisIsMyRegex' ---> 'This Is My Regex'

14th Aug 2018, 11:45 AM
Hoang Anh
Hoang Anh - avatar
5 Answers
+ 10
A good way to try out your regex is to use www.regex101.com Supports Perl/PHP, Python, JavaScript and GoLang
14th Aug 2018, 11:53 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 3
var input = "ThisIsMyRegex"; re = /([A-Z][a-z]+)/; var output = input.split(re).join(' '); console.log(output); https://code.sololearn.com/W0iGefVbd11c/?ref=app
14th Aug 2018, 12:17 PM
CalviŐ˛
CalviŐ˛ - avatar
+ 2
It's like, if the program encountered a word, add a space after it?
14th Aug 2018, 12:17 PM
Alquen
Alquen - avatar
+ 1
oh yeah. Thank you guys!
14th Aug 2018, 12:21 PM
Hoang Anh
Hoang Anh - avatar
+ 1
Read on regExp on sololearn or Javascript. Info
15th Aug 2018, 11:37 PM
Decodeworms Olamilekan
Decodeworms Olamilekan - avatar