Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(?P<number>\d+) (?P<word>\w+)
"
gm

Description

搜尋到的內容,區分為\g<word>, \g<number>, 代換到replace的位置 python和其他的程式,用法不同,如:$1,$2

Submitted by anonymous - 6 years ago