Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

243
Views
Monaco editor Uncaught SyntaxError: Invalid regular expression: /^*-+:*$/: Nothing to repeat

I'm using Monaco editor in my app. I get this error on Firefox and some versions of Chrome and somehow it works fine with version 96 of Chrome

Console displays:

Invalid regular expression: /^*-+:*$/: Nothing to repeat

Error in console

This is the code:

    $(function () {
        require.config({ paths: { vs: '/static/node_modules/monaco-editor/min/vs' } });
        let editor;
        require(['vs/editor/editor.main'], () => {
            editor = monaco.editor.create(document.getElementById("content"), {
                theme: 'vs-dark',
                language: "yaml",
                model: monaco.editor.createModel(`{{content | safe }}`),
                wordWrap: 'on',
                automaticLayout: true,
                minimap: {
                    enabled: false
                },
                scrollbar: {
                    useShadows: false,
                    verticalHasArrows: true,
                    horizontalHasArrows: true,
                    vertical: 'auto',
                    horizontal: 'auto',
                    verticalScrollbarSize: 17,
                    horizontalScrollbarSize: 17,
                    arrowSize: 30
                }
            });
        });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You need to escape the first * or the starting ^. You cannot repeat the starting ^. Choose to use one literal or the other. So 'zero or more ^' or starting with *.

/\^*/

or

/^\*/
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!