Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Exercise: Level 3 #3 #663

Unanswered
leviathan125 asked this question in Q&A
Discussion options

Hello I am not sure how to tackle this question because this day doesn't really cover the regexp.
This is the code that I have so far and I am only able to clear the % symbol please help:

`const sentence = '%I $am@% a %tea@cher%, &and& I lo%#ve %te@a@ching%;. The@re $is no@th@ing; &as& mo@re rewarding as educa@ting &and& @emp%o@weri@ng peo@ple. ;I found tea@ching m%o@re interesting tha@n any ot#her %jo@bs. %Do@es thi%s mo@tiv#ate yo@u to be a tea@cher!? %Th#is 30#Days&OfJavaScript &is al@so $the $resu@lt of &love& of tea&ching'

let patternFive = /%/g, patternSix = /$/g, patternSeven = /&/g, patternEight = /@/g, patternNine = /;/g
console.log((sentence.replace(patternFive, '')))
`

You must be logged in to vote

Replies: 1 comment

Comment options

Hello there,
I think it doesn't matter if you could solve the quest.
(and you probably missed the # sign

console.log(sentence.replace(/[%$@&#;]/g, ''))
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /