Regular expression matching problem?

as shown in the figure, area 1 is exactly the same as area 2, but area 1 is the complete area, and area 2 + 3 is the complete area, so part of the area of area 2 is exactly the same as that of area 1. In regular matching, writes according to area 1, then area 3 does not match. If you write according to area 2, area 1 will greedy area 2.
is a bit messy, that is, the comments of the article. No.1 is a direct comment. The reason why No.2 is more than No.1 is that No.2 commented on No.1, so
I put a reference address: https://xueqiu.com/statuses/c.. This is a random test address (headers is below). If the snowball party thinks it is inappropriate, you can contact and delete it.
cookies is not logged in.
`headers = {

    "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
    "X-Requested-With": "XMLHttpRequest",
    "Referer": "https://xueqiu.com/",
    "Content-Type": "application/json;charset=UTF-8",
    "Cookie": "s=ee11txgiln; _ga=GA1.2.1146559934.1538272510; device_id=6d1339879611fe18e7ccd26bff3d51e5; __utmz=1.1540351301.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); aliyungf_tc=AQAAAKBKQzmNDgAANCC+PfASvjnuwIqz; xq_a_token=2da5342ee6de7bf35ff52ec296426e9c9670f647; xq_a_token.sig=C57MGRXU_-qi2-KXnJaQ6tX4qLI; xq_r_token=f37df9336ae424cffdbe3a31123f2ab4676ba00c; xq_r_token.sig=_VMY0dRhVuU359Ecmhs_1Gtuzto; _gid=GA1.2.2127579758.1542003777; Hm_lvt_1db88642e346389874251b5a1eded6e3=1539569640,1540350870,1541485173,1542003777; u=561542003777391; __utmc=1; __utma=1.1146559934.1538272510.1542003791.1542007783.7; Hm_lpvt_1db88642e346389874251b5a1eded6e3=1542010360; _gat_gtag_UA_16079156_4=1"
}`
Nov.12,2021

looks like json, parsing with json is better, why regular?


solved with json parsing.
after requesting a web page, the complete json data is returned, so just:
json.loads () is fine.
then find the corresponding node (id and so on). The returned result is that dict, is converted into str and then regular is used.

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-1e524ff-4517f.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-1e524ff-4517f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?