regular expression not work

when I edit my record and click on save btn, it’s not work (no action) and i got this error in console:

ew.js:5 Uncaught SyntaxError: Invalid regular expression: //^(?:+?98)?0?9[0-4]d{8}$//: Nothing to repeat
    at String.match (<anonymous>)
    at Object.checkByRegEx (ew.js:5)
    at x.fuseredit.validate (<anonymous>:28:20)
    at x.canSubmit (ew.js:5)
    at HTMLButtonElement.p (ew.js:5)
    at HTMLButtonElement.dispatch (jquery-3.4.1.min.js:2)
    at HTMLButtonElement.v.handle (jquery-3.4.1.min.js:2)

i use ‘/^(?:+?98)?0?9[0-4]\d{8}$/’ as Arguments (Client-side) and Arguments (Server-side)

What for that regular expression? Can you explain it in more detail by using a real example?

it is for checking mobile number in IRAN

I use another regex: (0|+98)?(|,|-|[()]){0,2}9[0|1|2|3|4|9](|,|-|[()]){0,2}(?:[0-9](|,|-|[()]){0,2}){8}
but i got same error again: (I check my regex in it is ok (regex101.com)
Uncaught SyntaxError: Invalid regular expression: /(0|+98)?(|,|-|[()]){0,2}9[1|2|3|4](|,|-|[()]){0,2}(?:[0-9](|,|-|[()]){0,2}){8}/: Nothing to repeat
at String.match ()
at Object.checkByRegEx (functions.js:3652)
at Validators.js:308
at e.t.validate (Field.js:126)
at t.a.validateFields (Form.js:135)
at t.fuseraddopt.validate (:58:23)
at t.I.canSubmit (FormBase.js:57)
at HTMLButtonElement.i (functions.js:2226)
at HTMLButtonElement.dispatch (jquery-3.5.1.min.js:2)
at HTMLButtonElement.v.handle (jquery-3.5.1.min.js:2)

ghasembaghi wrote:

i use > ‘/^(?:+?98)?0?9[0-4]\d{8}$/’ > as Arguments (Client-side) and Arguments (Server-side)

Your expression is for server side PHP only. In JavaScript it is not enclosed by “/”.