showing results for - "javascript use variable regex"
Fabio
22 Sep 2018
1// CREATE A REGEXP object
2var replace = "regex";
3var re = new RegExp(replace,"g");
4//then use
5"mystring".replace(re, "newstring")
Elisa
17 Sep 2017
1var pattern="cd"
2var repeats=3
3new RegExp(`${pattern}{${repeats}}`, "g") 
4
queries leading to this page
regex variablehow to add variable in regular expression javascriptregex use variable in javascriptuse variable in regex pattern javascript execvariables in regex javascriptjavascript regexp variablespass dynamic regex value in new regexphow to give variable inside regex pattern javascriptuse variable in regex javasciprtuse variable in regex exp javascripthow to insert a variable into replace jshow to but a varivable string inside regexjs reg variablevariables inside regexjavascript regex with variable withuse variable in regex jsregex variable 2f 2fadd variable in regex jsjavascript add variable into regexuse a variable in regex javascriptpass variable to regex javascriptvariables in regexp javascriptinsert variable in regular expression javascripthow to create regex with variable javascritjs create regex from variablepass a variable into regexuse a variable in a regex javascripthow to use variable value in regex javascriptvariable in reg jswhy javascript regex in variableadd variable to regex javascriptadd variable regex jsadd a variable in regex replaceusing variable in regexreplace regex variable jsjs variable in regex replaceuse variable in regexp javascriptjs regexp variable in patternjs regex and varhow to write variable name in regex in javascript 3fjs regex from string variablejs regex in if to varregular expression as a variableregex with variables javascripthow to create regex with variable jsregex variable javascriptjavascript variable regexuse a variable in regexregex set variable javascriptusing variable in regular expression javascriptuse variable in regular expression in jsjs include var in regexhow to use variable in regex jshow to turn variable intro regex jsadding variable in regexjavascript use variable in regexjs add variable to regexhow to use regex on a variablepass variables in to regexvariable inside regular expresionnew regex with variablejavascript regex variableuse var in regezhow to use a string variable in a regual expression javascripthow to pass a variable in a regular expression javascriptusing variables in regex javascriptjavascript pass variable to regexjavascript variable in regechave variable value inside regexnode make regex from string variablejs var in regexjavascript varaibe in regexhjavascript regexp use variablejs new regexp with variablevariable in regex pattern javascriptregexp with variable jsnode regex with variableregex in variable javascriptjavascript regex in variablejavascript regex from variablevariable regex patternprovide variable in regex in jsjs use variable in regexput variable in regex javascriptregex javascript variableget script variable in javascript via regexvariable regex javascriptput js variable in regexregex for javascript variable name how to put variable in regez javascriptfunction regexvar 28 29regex 24 variablehow to pass variable in regexp substring javascript variable regular expressionjavascript variable in regex pattern replace javascript use varibalevariables in regexregexp with variable string in jsinsert a variable into regex javascriptjavascript use va in regexvariable in regular expression jsjs varibales inside regexesregex panrams javascritregular expression with variable javascriptnode js regex with variablereference variable in regexusing variables with regex javascriptregular expression match variable literallyregex javascript variablesvariable in javascript regexhow to work with variables in regex javascriptpassing variable as regex javascriptregex variable value javascriptadd variable in regex javascirptvariable in a regex jsregex pattern with variablehow to put variable name in regex javascripthow to add variable in regular expression 2f 2f in javascriptjavascript create regex from string variablejs put variable inside regexuse regex with var jsjavascript regular expression with variableregex variable meaningregexp variableregex variable is constant or let in jsjavascript use variable regexnew regexp javascript variablehow to use variable in regex javascriptusing javascript variables in regex expressionjs regex using variableusing variables in regex pattern javascriptjs regex insert variablejs regex with variable in patternregex with variable in javascripthow to put variable between regexcreate regex with variable javascripthow do you use a variable in a regular expressionjs regex with variablevaraible in regexhow to put regex in string in jsjavascript regex with variable in patternvariable inside regex jsvarible in regex jsjavascript add variable to regex patternvariable in regexpadd variable in regex javascripthow to define regex as variableregex from variable javascriptjs regex to variablejavascript regex match variablejavascript using variables in regexhow to use variables in regex jsuse regex in javascript variablejavascript regular expression use variablehow to write variable in regex javascriptusing variables in regex jshow to pass variable in regex javascriptjs regex variable patternregex string with variables javascripthow to include variable in regexuse variable in a regexnew regex js with variablehow to use variable inside regex expression in javascripthow to add variable in replace javascriptjs interplate variable in regexuse variable value in regexp javascriptvariable in a regexhow to variable pass in regex javascripthow to pass variable to regex javascriptjavascript insert a variable in a regular expressionget variable javascritp regexjs variable in regechow to replace varialbe in expression jsjavascript compose regexregex use variable name javascriptstring variable in regex jsuse variable in regex javastriptjavascript regex variablesjavascript regex include variableregex with variableput variable on regex jshow to regex variables jsjavascript regex into variablehow to form a regex in javascript variableregex as variable javascriptinsert variable into regex javascripthow to declare variable in regular expression javascriptcan i use variable inside regex jsjs regex how to put variable in patternvariabel in regex jsjs regex use variablejs insert variable content into regexcan i use variables inside regex javascriptadd a variable in regex javascriptdefine variable in regexjavascript regular expression variable in patternjs variable in regexhow to put variable in regex javascript 2f 2fvariable in js regexadd variable to regex jsjs include variable in regexpass a variable to a regexjavascript use variables in regexjavascript variable in regex matchwrite a variable in javascript in regular expressiondefining regex in varjavascript construct regex using variablepass a varaiable as a regexhow to use variable in regular expression jsjavascript variable in regular expressionhow to use variable in javascript regular expressionuse a paramater in regex jscan i pass a variable to a regex javascriptjavascript new regexp from variablejavascript regex from string variableregex from a variable jscreate regular expression javascript using variablesjavascript variable in regexvariable in regular expression javascripthow to put a variable string in a regex javascriptvariables regex javascriptuse variable in regexregex variable name javascriptuse parameters in regexregex js variablepass variable to regrex literal notation javascriptpass regex expressin as variableusing a variable in a regex javascriptadding variable to regular expressing javascriptjs var inside regex 24regex with variablejavascript insert var in regexregex pattern variable javascriptcan you pass a variable to regexhow to create a regex using variable javascripthow to insert variable in regexjs regexp with variableshow to write a variable in regex javascriptjavascript arguments in regexregex with javascript variablees6 regexp with variablehow to use variable in regex patternhwo to add a variable inside regex expression jsjs variable in regular expressionhow to make a regex with variable javascripthow i use a variable in regexset variable as regexjs regular expression with variablejavascript use variable in regular expressionregex nodejs add variablejs insert variable in regexjavascript string replace variable regexput variable number into regex javascripthow to add a variable to regexp in javascriptinsert variable in regex javascriptuse variables in regex javascriptjavascript regex add variablevariable as regex jshow to use varialbles in regexregex variablesjavascript regular expression use value in variableput a variable in regexuse variable in regex pattern javascriptinclude variable in regex javascriptregex javascript with variablehow to insert string variable in regex javascriptusing variable within regexregex 2fstring 2fi js use variablestring variable as regex jsinsert variable in regex pattern javascriptjavascript regext variablepass variable in js regular expressionvariable with regex javascriptjs make a regex with a variablejs regex with varhow to put variable in regex javascripthow to create regex variable javascriptregex use varaible javascripthow to use variable in regex pattern javascripthow to use variables inside regular expressionn 2f 2f javascriptjavascript assign regex to variableregex javascript get variablesjs regex and varijs define a regex variablenodejs use variables in regexpass param to regex jsadd variable to expresion regex javascriptjavascript how to make a regular expression variableadd regex to var in jsusing a variable in regexjs use variable in regex patternusing a variable with regexregex javascript use variablejs pass variable to regexadd variable to javascript regexbuilding regex using variablesjavascript use variable in regex replace 2fvariable 2f in regular expression in javascriptpass variable in regex javascripthow to search for a variable with javascript regular expressionregex with parameter javascriptpass var to reg exnodejs add regexp on a variableargument in regex javascriptvariable into regex javascripthow to add a variable in regex b javascriptjavascript replace pattern variablejavascript regex variable in patternusing variable in regex jsassign regex to variable javascripthow declare variable in regex javascriptjavascript variable name regexwhat is var regex 3djavascript regex pattern with variableregex variable jstype variable in regex javascriptuse a variable in regex noderegex var jsnode regular expression add variableput regex in stringjavascript variable in regexphow to use variable in regexjavascript create regex pattern from string variablejavascript variable as regexhow to put a variable in a regex javascriptjavascript add variable to regexassign regex in variable javascriptadd variable to regexpjavascript regexp with variablesregiular expression define variableuse variable in javascript regexhow to pass a variable in as regexregex jwith variables javascriptvariable in regexp javascriptjs give a variable in regexjacvascript regex to variablejavascript regexp variablejavascript using a variable in regexjs regex add variablejs regex as variablejavascript regexp constructor with variablehow to insert variable into regex in javascriptregex for variableshow to use variable in a regexuse a variable like regexjs regex variable in patternadd variable to regexjavascript replace with variablepass variable into regex javascriptjs build regex from variablehow to add variable in regular expression create regex with variable strings javascriptjs variables inside regexadd variable in regexregexp variable jsputting variables in regexpass variable to regular expression javascriptjs insert to regex variableuse varaible in regex statment javascriptput variable in regexvar in regex jsjavascript variable inside regexput variables in regexp patternhow to pass a variable into regex javascriptjavascript create regex from variableregexp string with variable jsjavascript regex user variablejs variable inside regexhow to make regex out of variable create reg ex using variable jsregex from variable jsregex with a variable jsjs how to insert variable string in regexvariable regexuse variable in regex javascriptjs save regex as variablejs new regexp variableuse a variable inside a regex javascriptjava script variable regular expressionreplace regex variable javascriptset string variable regex jsjavascript insert variable into regexjavascript how to use variable in regexjavascript regex with variablehow to write variables in regex javascriptput variable inside regex jsregex using variable javascripthow to pass a variable inside a regexhow to store regex in variable javascriptvariable in regexuse vartible in regexhow to add variable in regexjs make regex with varablejavascript adding variable inside regexhow to use a variable in regex javascriptjavascript put a variable in a regexjavascript regex pass variablejavascript insert variable in regexcan we use a variable inside regexvariable regex jsjs regex from variablees6 cant put variables inside regexvariables in javascript regexregex of a variableregext variable javascirptuse variable for regular expression javascriptjs variable in regex patternregex with variable suse variable inside regexcan you use variable in regex javascriptusing variables in regexjs variable regexcreate a regex expression from a variable javascriptjs use variable inside regexjavascript replace regex variablehow to make regex variable javascriptuse variable in regular expression javascriptregex javascript using variablejs regex with variablesjavascript how to add variables in regexpretinsmake regex with variablejavascript regular expression variablehow to insert variables into regex javascriptjs replace regex variaturn variable into regex javascripthow to call a variable in regexhow to put a variable into a regex in jshow do you insert a variable in regex jshow to use variable in rehexvariable in regex expjs use var in regexjs regex as a variableusing a variable in regex jsjs put variable in regexhow to put regex element in variable javascriptvariables in regex jsuse variables in regexhow to use variables in regex javascriptvariable inside regex javascripthow to get a string variable in regular expressionadd variable inside regex in javascriptusing variables in javascript regexvariable inside a regexvariable in js regexpspecify a value of regex from a variable in javascripthow to use a variable in a regular expression javascriptregex for variable jsuse variable inside regex javascriptregex use variableuse variable in regexpcreate regex variable javascriptjs regex variablejavascript regex using variableregexp javascript with variable in patternregex in javascript variablejs use variables in regexhow to include variable in regex in jsjs variable within regexpjs variables in regexhow to call variable instide regex javascriptjs set regex to variablehow to put a variable in regexwork with regex with js variavleregex replace variable javascripthow to assign regex to variable javascriptput a variable in regex jsadd var in regex jsjs insert variable into regexregex with variable javascriptput a variable in a regex jsstore regex in variable javascripthow to pass variable in regexjs insert variale in regexvariable in regex javascriptusing variable in js regexhow to get and use variable regexregex with variable jshow to include variable inside regex typescriptnew regexp with variableregex js using variableregexp with variables javascriptregex variable in patternjs insert var in regexvariable in regex jsjavascript use variable regex