such as the title: for example, if the string is "www $a $b $c kkk ", the matching result will become [a _ line _ b _ r _ c] . currently contains a defect code (does not match "$a $b $c " correctly). The reason is that the matchReg match ends with a ...
I have a string. I want to use regular matching to find out the time in the log. The string is . INFO: 2018-12-05 13:49:31 ip[10.26.100.4] token[18167782963] [application] Jupiter http: i.jupiter.baidu.com api tags info?cate_id=530&sort=-weight ...
for example, I have a string abaafedf { "name ": peter, "jobs ": { "title ": "supervisor ", "age ": 45}} I want to extract the { "name ": peter, "jobs ": { "title ": "supervisor ", "age ": 45}} with the regular. I don t know how to write this...
var str = "Mozilla 5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit 604.1.38 (KHTML, like Gecko) hybrid 2.1.5 parent Version 11.0 Mobile 15A372 Safari 604.1" hybrid 1.1.5 parent parent 1.1.5 regular do not know how to match, big f...
echo preg_match(" app common model NewsModel ", app common model NewsModel ,$matches,PREG_OFFSET_CAPTURE); 0 preg_match(" app common model ([a-zA-Z]+)Model ", app common model NewsModel ,$matches); -s...
re.findall ( [u4E00-u9FFF | () ()] {5jue 20} Co., Ltd. | [u4E00-u9FFF | () ()] {5jue 20} Co., Ltd.) [ Insurance brokerage companies may use limited liability companies or joint stock limited companies ) [ Insurance brokerage companies may use limi...
question: for string= "jsfd {sdf} df ", I want to extract the sdf into "jsfd {} df ". uses patten = re.compile (r "{(. *?)} "), but finds that findall will find sdf, and finditer or sub will match {sdf}. I don t know why? When will the regular matc...
What is the difference between capture and matching in regularity? ...
Industrial and commercial rules: no more than 20 Chinese characters from a non-Chinese character to limited company or limited liability company must be all Chinese characters + parentheses (both Chinese and English parentheses are allowed, Eng...
7.html 1-2-3-4-5-6-jump to s 1_2_3_4_5_6_7.html url-replace _ how to make NGINX jump ...
s (.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?).html$ s $1_$2_$3_$4_$5_$6_$7_$8_$9_$10_$11_$12.html permanent; according to imitated by Baidu, this does not jump, modify, ask for advice ~ mainly want to change the pseudo-s...
I need to enter pure numbers in an input box, so I take it for granted that I write <input type="number" > then found that it is possible to enter mathematical symbols such as e and decimal point. Look it up on the Internet, and modif...
the string to be matched looks something like this: url("http: localhost:8888 img 4ecdd7cd00b149c1ba169c2671dcdc82.png") the result I want: http: localhost:8888 img 4ecdd7cd00b149c1ba169c2671dcdc82.png what I m trying to write is regula...
want to extract continuous Chinese characters + punctuation in html, ask how to write regular ...
A string can only appear once in a paragraph of text, for example: this is a-sharp-sharp regular expression. Among them, "- sharp-sharp " can only be matched once, and the order of occurrence is not fixed. How to solve this kind of regular expression? ...
The string can only be swapped for . , : , cannot contain other characters, you only need to verify whether the string contains only the above four characters. $string = 10.0.3.1, 10.0.0.0 16,2001:db8:100:934b::3:1, 2001:db8:100:934b:: 64 ; if (che...
when writing Mini Program, I sometimes accidentally write the unit as px . But it is well known that Mini Program generally uses rpx as the adaptation unit. then leads to the idea that you want to use the regular pattern of vscode and use foresigh...
want to match & [a-zA-Z] *; , but not & . How can I achieve this? Can it be implemented directly with regularization? ...
problem description want to know the difference between single-line mode and multi-line mode in js? can you give me some examples? the environmental background of the problems and what methods you have tried after consulting a lot of materials, t...
consists of uppercase letters, lowercase letters, numbers, more than 8 digits. now I write ^ [Amurz] + [amurz] + [0-9 +]. * $ , but in this case, it must come in the order of uppercase letters, lowercase letters and numbers, so I would like to ask h...
ask everyone Filter the array (in a relatively simple way) I want Filter to remove objects with the same id in all objects (no matter what the name is as long as the id is the same), that is, to ensure that the id of each object is different. If there...
question: how to understand the delay execution of setTimeout description: I want to see the specific use of the new method by changing the construction properties of the function prototype, but after triggering changAs () , I found that the construct...
for example, the following code: < input type= "text " v muri model = "sellPrice " > < input type= "text " v muri model = "buyVolume " > reg: ^ [0-9] + (. [0-9] {1 Magazine 8})? $ reg1: [0-9] dudes watch: { buyPrice:function(){ ...
there is a system on the virtual with port number 9200. now I don t want to go directly to this port. I want to access it through port 80 that nginx listens to. but location doesn t seem to match all the time. Thank you for your advice. nginx.conf...
the last step in creating a redis cluster with docker-compose is to use redis-cli to concatenate the started redis nodes, but redis-cli-cluster create has an interactive process (you need to enter "yes "). How to accomplish this whole operation in dock...