Spreadsheet step 74

tried everything still confuse

const highPrecedence = str => {
 const regex = /([\d+|(\d+)?.\d+])(\d+)?([*|\/])(\s+)?(\d+|(\d+)?.\d+)$/ig
}

Your first capture group should match any digit or a period. Use the special \d character class.

1 Like

go simpler, the regex you need is much shorter than that

1 Like

Hello, I’m stuck with this as well. I tried to take it step by step and can’t seem to figure this out. I currently have /([\d.]+)([*/])([\d.]+)/. I tried modifying the second capture case to -([*/]) as well but still can’t get it.

please disregard, I figured it out. :sweat_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.