>  Q&A  >  본문

python - 正则表达式求教

{"author":{"user_id":640703312,"user_name":"FOREVERR\u5b89\u5b89","props":null},"content":{"post_id":32334914000,"is_anonym":false,"forum_id":874949,"thread_id":2108034524,"content":"287226800@qq.com    \u8c22\u8c22~<img class=\"BDE_Smiley\" src=\"http:\/\/static.tieba.baidu.com\/tb\/editor\/images\/jd\/j_0043.gif\" width=\"25\" height=\"25\">","post_no":118,"type":"0","comment_num":0,"props":null,"post_index":23,"pb_tpoint":null}}

<type 'str'>


求教如何用正则获取FOREVERR\u5b89\u5b89
PHP中文网PHP中文网2741일 전416

모든 응답(1)나는 대답할 것이다

  • PHP中文网

    PHP中文网2017-04-18 10:07:05

    규칙성을 기준으로"user_name":"(.[^"]*)" 추출할 수 있습니다.
    이 문자열은 json 문자열이므로 json을 구문 분석하려면

    을 사용하는 것이 좋습니다. 으아아아

    회신하다
    0
  • 취소회신하다