+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'

8/14/2018 11:45:22 AM

Hoang Anh

5 Answers

New Answer

+10

A good way to try out your regex is to use www.regex101.com Supports Perl/PHP, Python, JavaScript and GoLang

+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

+1

It's like, if the program encountered a word, add a space after it?

+1

oh yeah. Thank you guys!

0

Read on regExp on sololearn or Javascript. Info