Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

regex

  1. John Weiss

    JavaScript Reg Exp Not Working With matchAll

    Trying to get all delimited items in a string. Here's the code: const myString = "abc{{HELLO}}defg{{WORLD}}" const templateFieldsRegex = /\{\{\w+\}\}/g const templateFields = myString.matchAll (templateFieldsRegex) I expect to get array ["{{HELLO}}", "{{WORLD}}"] Not getting any results. also...
Back
Top Bottom