[Day21]- 正则表达式

  • 基础
  1. 用文字去表达,使用\d去表示0-9的数字字元,使用re模组内有的compile()方法,回传一个regex物件,regex里面有一个search()方法,去搜寻,但是search()只能传回第一个相符的字串
    https://ithelp.ithome.com.tw/upload/images/20211003/20140644xDJrOaRZao.png
    https://ithelp.ithome.com.tw/upload/images/20211003/20140644dNlpqrxL7M.png
  2. Findall() 将搜寻到的手机号码利用串列的方式传回
    https://ithelp.ithome.com.tw/upload/images/20211003/201406444avZ1KzcYb.png
    https://ithelp.ithome.com.tw/upload/images/20211003/20140644dyVD8b8sfT.png
  • 搜寻比对模组
  1. 管道|
    ann|cindy 要搜寻ann和cindy
    https://ithelp.ithome.com.tw/upload/images/20211003/20140644xHpK2bpa6A.png
    https://ithelp.ithome.com.tw/upload/images/20211003/20140644bYWXrwP59C.png
  2. 使用"*"做搜寻 (na)字串可以重复0到多次,表达方式为(na)
    https://ithelp.ithome.com.tw/upload/images/20211003/20140644WRSbF5xcee.png
    https://ithelp.ithome.com.tw/upload/images/20211003/20140644CoTr0N1E11.png
  3. 所有字元使用万用字元 ".*"
    https://ithelp.ithome.com.tw/upload/images/20211003/20140644IyvbeVFag9.png
    https://ithelp.ithome.com.tw/upload/images/20211003/20140644aYkYcBPLmW.png

<<:  Day 0x17 - 建立订单(赞助)的画面

>>:  Dungeon Mizarka 021

【XCode 使用技巧】官方工具 x 你所不知道的开发功能

XCode 使用技巧 XCode x Swift x SwiftUI 目录 前言 : 何时才能愉快的...

Day22 NiFi - 与 GCP PubSub 对接设定

今天要介绍的是 NiFi 如何与 GCP PubSub 的服务对接与设定,很多在 Streaming...

C#入门之函数

今天我们来一起聊一聊函数。C# 和其他编程一样,可以通过函数的方式,以实现代码的复用。我们可以把函数...

「学习」的美好之处,是没有人可以把它从你身上拿走。

「学习」的美好之处,是没有人可以把它从你身上拿走。 The beautiful thing abou...

[第11天]理财达人Mx. Ada-借券查询

前言 本文说明进行查询商品借券(或有券源,short_stock_sources)数量。 借券(或有...