Python Programming for Biology: Bioinformatics and Beyond



Download 7,75 Mb.
Pdf ko'rish
bet484/514
Sana30.12.2021
Hajmi7,75 Mb.
#91066
1   ...   480   481   482   483   484   485   486   487   ...   514
Bog'liq
[Tim J. Stevens, Wayne Boucher] Python Programming

Method

Description

re.compile(patt,



flags)

Creates a RegexpObject from a pattern string.

re.escape(text)

Creates a string where non-alphanumeric characters are

escaped, by putting a backslash in front.

re.findall(patt,

text)

or

reObj.findall(text,



start, end)

Creates a list of substrings that match a pattern.

re.finditer(patt,

text)


or

reObj.finditer(text,



start, end)

Like .findall() but generates an iterator that gives back

objects of type MatchObject.

re.match(patt,

text)

or

reObj.match(text,



start, end)

Creates a MatchObject if a pattern matches the start of a

string, gives None otherwise.

re.search(patt,

text)

Create a MatchObject if a pattern matches within a string,



gives None otherwise.


or

reObj.search(text,



start, end)

re.split(patt, text,



maxNum)

or

reObj.split(text)



Splits a string into a list of strings according to where a

pattern matches. Optional maximum number of splits to

perform.

re.sub(patt, repl,

text, maxNum)

or

reObj.sub(repl,



text, maxNum)

Creates a new string by replacing all matches to a pattern

with a replacement substring. Optional maximum number of

replacements can be given.

re.subn(patt, repl,

text, maxNum)

or

reObj.sub(repl,



text, maxNum)

As above but also reports the number of substitutions made.

Output is a tuple (newString, numSubs).

The  following  tables  lists  selected  methods  of  the  re.MatchObject,  as  given  by

re.search() etc.


Download 7,75 Mb.

Do'stlaringiz bilan baham:
1   ...   480   481   482   483   484   485   486   487   ...   514




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish