• JS MAC address regular expression


    Copy codeThe code is as follows: function CheckForm2() { //MAC address regular expressionvar reg_name=/[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}/; if(!reg_name.test(document.form2.mac.value)){ Alert (“MAC address format is incorrect! MAC address format is 00:24:21:19: BD: E4 “);document.form2.mac.focus(); return false; } return true; }

  • Online regular expression testing, regular substitution tool


    Online regular expression testing, regular substitution tool Online regular expression testing, regular substitution tool This tool provides online regular expression testing, supports replacement, client real-time calculation and data real-time update. https://tooltt.com/regex/

  • Development tips: Unicode sorting and regular matching


    brief introduction We know that computers first emerged in foreign countries. Considering the computer performance and common foreign characters at that time, ASCII was used in computers at the beginning. After all, the characters that ASCII coding can represent are limited. With the development of computers and the popularity all over the world, more coding […]

  • The difference between using test in Firefox and IE


    Copy codeThe code is as follows: <script language=”javascript” type=”text/javascript”> function fun(){ document.write(/a/gi.test(“a”)); } fun() fun() </script> The execution result in IE is: truetrueThe execution result in Firefox is: true falseIn regular / expression / GI, G means global, and I means case insensitive.Generally, the global attribute is true, which is not good for test application. […]

  • Use JavaScript regular expressions marked with “g” correctly


    Let’s talk about the use of regular expressions marked with “g”. First, let’s look at a piece of code, which is easier to understand from an example. Copy codeThe code is as follows: 1 function a(val) 2 { 3 var re = /^\d+$/g; 4 alert(re.lastIndex); 5 return re.test(val); 6 } 7 alert(a(5)); 8 alert(a(6)); Running […]

  • Test function of regular matching


    var fnTest = /xyz/.test(function(){xyz;}) ? / b_ superb/ : /.*/; I am very confused about the usage of the regular expression matching function test/xyz/.test(function(){xyz;}) I looked up the description of the test function in Mozilla Developer CenterExecutes the search for a match between a regular expression and a specified string. Returns true or false. Whether […]

  • Parsing JS regular expression


    JS regular expression Regular expression is a logical formula for string operation Here we recommend an online testing website for regular expressionsRegular expression online testing regular grammars In JavaScript, a regular expression is also an object, an index type. *Using a regular expression literal quantity is the easiest way. Two / are regular expression delimiters. […]

  • Template variable replacement in written examination


    JS regular short, assertions do not match, matching can be captured, capture can be referenced, global all come once. problem Given the string containing n variables, it is required to replace the variables with corresponding values, such as $no = 5 and $title =’Jack ‘ <div> <p> {$no}</p> <p> {$title}</p> </div> thinking Define regular lookup$String […]

  • Check whether the eight digit number is a valid date


    Test whether the eight digit number is a valid date String : Regex : [Ctrl + a all optional note: to introduce external JS, you need to refresh the page again]

  • EDITPLUS emeditor and search and replace regular expressions


    Use “. *” to match any character in emeditor. If you want to simplify all similar “< table style =” boder: 1px solid blue “>” to “< Table >” searchable string “< table style =. *” > “and replace it with” < Table > “. Correspondingly, use “*]” in search and replace (sr32. Exe) to […]

  • Word boundary of regular basis


    1 Overview “\ B” matches the word boundary and does not match any characters.“- B” matches only one position, one side of which is the character that makes up the word, and the other side is the beginning or end position of the non word character or string. “\ B “is zero width.Basically, all the […]

  • Extending regression library by regularization


    By Paul HiemstraCompile VKSource: towards Data Science You can also read this article on GitHub. This GitHub repository contains everything you need to run your own analysis:https://github.com/PaulHiemstra/lasso_tsfresh_article/blob/master/lasso_tsfresh_article.ipynb introduce For many data scientists, the most basic model is multiple linear regression. In many analyses, it is the first to be invoked and serves as a benchmark […]