Tag:Study notes

  • PHP regular expression learning notes

    Time:2021-9-16

    Copy codeThe code is as follows: //Match text, which is easy to use occasionally, but be careful that the characters contain \ E  $str = ‘[a-z]’;  $str = preg_replace(‘/\G[a-z]\E/’, ”, $str);  echo  $ str;  // Print empty, all replaced, probably preg_ Quote function  Copy contents to clipboard code:  //Name the matching result so that it can be used to get the […]

  • More practical regular expression learning notes

    Time:2021-9-1

    //Match text, which is easy to use occasionally, but be careful that the characters contain \ E$str = ‘[a-z]’; $str = preg_replace(‘/\G[a-z]\E/’, ”, $str); echo  $ str;  // Print empty, all replaced, probably preg_ Quote function //Name the matching result so that it can be used to get the value in the matching result$str = ‘abc123abc’; preg_match(‘/(?P<num>\d+)/’, $str, $arr); echo  $ arr[‘num’];  // Equivalent to […]

  • Another regular expression learning note

    Time:2021-8-14

    1. \ B: indicates the beginning or end of a word. It may be a space, punctuation or line feed, but \ B does not match any of them. This refers to any of these elements.Example: \ BHI \ B: find all “Hi” words in the text, but not including him, history, etc1.1 ^: the […]

  • Golang study notes (1): Introduction

    Time:2021-7-13

    The main features of go language Copy codeThe code is as follows: Automatic garbage collectionRicher built in typesFunction multiple return valueserror handlingAnonymous functions and closuresTypes and interfacesConcurrent programmingreflexLanguage interactivity High performance / efficient development install Installation instruction addresshttp://golang.org/doc/install Package download addresshttps://code.google.com/p/go/downloads/list Confirm whether the installation is successful Copy codeThe code is as follows: Go version […]