Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Getting the string and the regex of the matched object

import re
 
s = "Welcome to Softhunt"
 
# here x is the match object
res = re.search(r"S", s)
 
print(res.re)
print(res.string)
Comment

PREVIOUS NEXT
Code Example
Python :: Access python http.server on google colab 
Python :: inicio programacao python 
Python :: humanname python 
Python :: how to store .png file in variable python 
Python :: pandas to_csv hebrew 
Python :: how to iterate through a pandas dataframe 
Python :: python pop a element by index 
Python :: group a dataset 
Python :: python crosshair overlay 
Python :: detect if usb is plugged in python 
Python :: create a list of sequential numbers in python 
Python :: check even or odd in single line 
Python :: python ascii() 
Python :: python indian currency formatter 
Python :: Plot kdeplot, lineplot, scatterplot in seaborn 
Python :: discord.py add avatar to embed 
Python :: fillna pandas inplace 
Python :: streamlit format_func example 
Python :: python how to locate and fill a specific column null values 
Python :: inline if statement python return 
Python :: delete list using slicing 
Python :: truncate spaces in python 
Python :: find difference between two pandas dataframes 
Python :: django admin text box 
Python :: how to create tupple in python 
Python :: beautifulsoup remove tag with class 
Python :: how to comment python 
Python :: filtering certain rows in python that contains a part of string 
Python :: inverse of a matrix with determinant 0 python linalg 
Python :: speech to text 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =