Python: Regex. Index
Python: Regex re.subn
By Xah Lee. Date:
2022-07-30
. Last updated:
2022-07-31
.
re.subn(
…
)
Same as
re.sub
, except returns a tuple:
(
new_string
,
number_of_substitution_made
)
.
Python, Regex Functions
Python: Regex re.search
Python: Regex re.match
Python: Regex re.split
Python: Regex re.findall
Python: Regex re.finditer
Python: Regex re.sub
Python: Regex re.subn
Python: Regex re.escape
Python tutorial
Search 🔍
Help
Print Version
Builtin Help
Comment, Print
Comment
Print
Number
Number
String
String
Unicode
Arithmetic
Operators
Assignment
Convert Int Float String
Boolean
True, False
Boolean Operators
Test Equality
Test Order
Variable
Variable
Conditional
If Else
Loop, Iteration
Loop
Data Structure
List
Dictionary
Tuple
Sets
Sequence Types
JSON
Function and Class
Function
Class
Object, ID, Type
Module
Import Module
Regex
Regex
Read Write File
Read STDIN
Read File
Write File
Walk Directory
File Path
Find Script Path
Misc
Misc. Index