^(?: (?=$))?$ this rule is used to match the of an empty string. "".match( ^(?: (?=$))?$ ) ["", index: 0, input: "", groups: undefined] "1".match( ^(?: (?=$))?$ ) null ? = I know this is an antecedent ...
in the project, use regular matching img tags in the article. There is obviously img in the string passed in, but it is empty with regular matching. Baidu has searched a lot of regular expressions matching pictures, but still can t match them. imgReg =...
crawl a website with scrapy. The data is generated by js. The script, extracted by xpath is obtained as follows: define("page_data", { "uiConfig": { "type": "root", ...
there are some troublesome data. The date is a mixture of mm.dd, mm.d, m.dd and m.d. I want to match it with a regular. I write a data like this: ^ ([1-9] | 0 [1-9] | 1 [0-2]) ( .) ([1-9] | 0 [1-9] | 1-2 | 3 [0-1]) $ g. I found that this data can mat...
there are two serial services, one written by go and the other written by Python. use regular verification email address, found that the results of the two code verification are not consistent, and now want to unify the verification effect. Regular exp...
problem description in the project, you need to use a rich text editor to edit the text and pass it to the back end. the front end uses ...
the requirement is to remove the fixed format string from a js string, such as result = "123456789" ...
how does nodejs brush out all the Chinese in the text? Extract all Chinese from a html page or js text (retain any characters between the characters and remove all annotated text) and put it into another text? var getId = function(id) { ...
recently, I was learning about crawlers, and then I used get to connect to the web page, and then I asked a lot of questions. I said one by one, when I get, I added the following information params = header header = {user-agent: xxxx} the resulting te...
input: aaaaddabcabcabc use regular to replace the ending n abc with output: aaaadd the following can only replace the last substring: nt n n tqwe n t<br > nqwe n n n t<br > n n n t<br > n n...
interview encountered such a question, there is a string, "12345678abcABCDefghijk9874321YXWV321 ", now define the same type of characters (numbers for one type, uppercase letters for one type, lowercase letters for one type) for 4 or more consecutive, n...
not long after I first came into contact with python, I needed to use regularities when crawling pages, but I was confused after reading python s re library for a long time. Maybe I got silly after a whole day s work. =-sharp I have many of the follow...
The problem is as follows, as seen in the python getting started manual, re.sub () replaces I know the syntax of re.sub (regular string, replacement string, original string), but I don t understand this I also know that 1 is equivalent to re.sea...
the code is as follows: re.compile( ^( d{1,2}: )(.*?)(:) ) what is the logic and result of this code matching? Thank you. ...
2 var s = 12.34567 12.34 console.log(s.replace( . d{2} , * )) 12*567 console.log(s.replace( .[^ d]{2} d+ , * )) 12.34567...
the code is as follows: re.compile( [A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2} ) re.compile( [0-9a-fA-F]{4}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}.[0-9a-fA-F]{1} ) Please help parse the logic of this regular...
python regular matches the contents of the specified start HTML tag and end tag <div class="pbm mbm bbda cl"> <h2 class="mbn">< h2> <a href="http: bbs.aa.cc home.php?mod=spacecp&ac=p...
how do you use Python to match the two parameter values in SetValue in the following string? for example, several pieces of data failed to match between "Att_Sys_zh-cn_11_G " and 12 12 5 . <script> function init(){ SetValue( txt_gtin , &...
I use nginx and then I want nginx to satisfy XXXXXXXXXXXXX.. File suffix? md5=XXXXX (for example: test.jpg?md5=cno234f or test.mp4?md5=i9345nmjf ) access to a directory with alias , how can this rule be implemented? Thank you very much ...
for example: Establishment date: June 20, 2017; Business term: from June 20, 2017 to June 19, 2047; scope of business: real estate brokerage services; marketing planning; advertising graphic design; interior decoration. (for projects that must be approv...
clone a project from github to windows locally, and delete some files without doing anything after clone. is the following. The git repository looks like this: https: github.com feintervie fe ...
just work on the front-end rookie. All of a sudden, I want to write about Mini Program backstage. I have no idea at all. demand: front end: user 8ju 00max 81max 01max 8rig 02. The click-by-click button server needs to return the data obtained from a...
js calls Android for voice recording Android returns the absolute path and duration of the audio file but how does js get the audio file through the absolute path and transfer the file to the background through file ...
post table is the article table, the primary key is id tag table is the tag table, the primary key is id post_tag is the intermediate mapping table, and the field is post_id,tag_id now I want to select tag 1 to find out that all the tags and article...
in the electron project that has already been done, download a word document. How can electron have a prompt after the download is successful? ...