Skip to content
View Qiao12-pixel's full-sized avatar

Block or report Qiao12-pixel

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Qiao12-pixel/README.md
  • 👋 Hi, I’m @Qiao12-pixel
  • 👀 I’m interested in ...
  • 🌱 I’m currently learning ...
  • 💞️ I’m looking to collaborate on ...
  • 📫 How to reach me ...

''' Time:2021/10/8 18:46 Author:qiaolijie-201613336 File:demo02.py '''

import re ''' a='123--*' b=re.findall('123',a) print(b)

x='a123456b' y=re.findall('[a-z][0-9][0-9][0-9][0-9][0-9][0-9][a-z]',x) print(y) x='abcaacaccabc' rule='a[a,b,c]c' y=re.findall(rule,x) print(y) ''' '''(1)findall() 找到re匹配的所有字符串,返回一个列表

(2)search() 扫描字符串,找到这个re匹配的位置(仅仅是第一个查到的)

(3)match() 决定re是否在字符串刚开始的位置(匹配行首)''' ''' s = "010-123456789" rule = "010-\d*" rule_compile = re.compile(rule) # 返回一个对象 print(rule_compile) s_compile = rule_compile.findall(s) print(s_compile) # 打印compile()返回的对象是什么

s='abcabcacc' l=re.sub('abc','***',s)#替换字符串 m=re.subn('abc','xxx',s)#替换字符串并返回替换个数 n=re.split('b',s)#分割字符串 print(l) print(m) print(n) '''

Popular repositories Loading

  1. docs docs Public

    Forked from PaddlePaddle/docs

    Documentations for PaddlePaddle

    Python 1

  2. chatgpt-desktop chatgpt-desktop Public

    Forked from sonnylazuardi/chat-ai-desktop

    OpenAI ChatGPT desktop app for Mac, Windows, & Linux menubar using Tauri & Rust

    Rust 1

  3. Qiao12-pixel Qiao12-pixel Public

    Config files for my GitHub profile.

    Python

  4. Ql Ql Public

    xiaoqiao

  5. PaddleX PaddleX Public

    Forked from PaddlePaddle/PaddleX

    PaddlePaddle End-to-End Development Toolkit(『飞桨』深度学习全流程开发工具)

    Python

  6. PaddleHub PaddleHub Public

    Forked from PaddlePaddle/PaddleHub

    Awesome pre-trained models toolkit based on PaddlePaddle.(300+ models including Image, Text, Audio and Video with Easy Inference & Serving deployment)

    Python