Learn Form Validation by Building a Calorie Counter - Step 30

Tell us what’s happening:

Hey there, can someone tell me what i did wrong here?

Your code so far

function isInvalidInput(str) {
  const regex = /\d+e\d+/e/; 
}

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 30

the link to the step is not working please change the link or let’s fix this first and try if it works

const regex = /[\d+e\d+]/i;

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Declare a regex variable, and assign it a regex that matches the character e .

only the character e, no numbers here

I tried the code you provided me and it didn’t work.

I’ve already passed the exercise this is the code.

function isInvalidInput(str) {  
   const regex = /e/i;
}