There are only 6 characters in the length, and the\ sign is not counted. Is there any way to do that?

strings in regular format are ignored

I want to get rid of the internal regularity of head and tail / and use new RegExp () to get a regular object, but\ is ignored, so my regularity is always wrong.

hopes to achieve something like this. For "/ ^ d $/", you can get "^\ d$" for "/ ^ d $/ ig", and "^\ d$" and "ig" for "/ ^ d < / d$ > $/ ig", but the\ sign is ignored, which is a bit of a headache.

May.08,2021


es6:

var res = String.raw`"/^\d*$/ig"`.match(/\/(.*)\/(.*)/);
console.log(res[1],res[2]); //^\d*$ ig

if you are in a variable, it is estimated that you can only write a map to write all the current escape lists and then replace them.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e187-2c3ed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e187-2c3ed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?