Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
7d447aab
Kaydet (Commit)
7d447aab
authored
Eki 13, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved search and match around so that search is documented first.
üst
3f08d40b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
libre.tex
Doc/lib/libre.tex
+25
-25
No files found.
Doc/lib/libre.tex
Dosyayı görüntüle @
7d447aab
...
@@ -364,10 +364,13 @@ leftmost such \character{\#} through the end of the line are ignored.
...
@@ -364,10 +364,13 @@ leftmost such \character{\#} through the end of the line are ignored.
\end{datadesc}
\end{datadesc}
\begin{funcdesc}
{
escape
}{
string
}
\begin{funcdesc}
{
search
}{
pattern, string
\optional
{
, flags
}}
Return
\var
{
string
}
with all non-alphanumerics backslashed; this is
Scan through
\var
{
string
}
looking for a location where the regular
useful if you want to match an arbitrary literal string that may have
expression
\var
{
pattern
}
produces a match, and return a
regular expression metacharacters in it.
corresponding
\class
{
MatchObject
}
instance.
Return
\code
{
None
}
if no
position in the string matches the pattern; note that this is
different from finding a zero-length match at some point in the string.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
match
}{
pattern, string
\optional
{
, flags
}}
\begin{funcdesc}
{
match
}{
pattern, string
\optional
{
, flags
}}
...
@@ -378,15 +381,6 @@ leftmost such \character{\#} through the end of the line are ignored.
...
@@ -378,15 +381,6 @@ leftmost such \character{\#} through the end of the line are ignored.
match.
match.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
search
}{
pattern, string
\optional
{
, flags
}}
Scan through
\var
{
string
}
looking for a location where the regular
expression
\var
{
pattern
}
produces a match, and return a
corresponding
\class
{
MatchObject
}
instance.
Return
\code
{
None
}
if no
position in the string matches the pattern; note that this is
different from finding a zero-length match at some point in the string.
\end{funcdesc}
\begin{funcdesc}
{
split
}{
pattern, string,
\optional
{
, maxsplit
\code
{
= 0
}}}
\begin{funcdesc}
{
split
}{
pattern, string,
\optional
{
, maxsplit
\code
{
= 0
}}}
Split
\var
{
string
}
by the occurrences of
\var
{
pattern
}
. If
Split
\var
{
string
}
by the occurrences of
\var
{
pattern
}
. If
capturing parentheses are used in
\var
{
pattern
}
, then the text of all
capturing parentheses are used in
\var
{
pattern
}
, then the text of all
...
@@ -469,6 +463,12 @@ Perform the same operation as \function{sub()}, but return a tuple
...
@@ -469,6 +463,12 @@ Perform the same operation as \function{sub()}, but return a tuple
\code
{
(
\var
{
new
_
string
}
,
\var
{
number
_
of
_
subs
_
made
}
)
}
.
\code
{
(
\var
{
new
_
string
}
,
\var
{
number
_
of
_
subs
_
made
}
)
}
.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
escape
}{
string
}
Return
\var
{
string
}
with all non-alphanumerics backslashed; this is
useful if you want to match an arbitrary literal string that may have
regular expression metacharacters in it.
\end{funcdesc}
\begin{excdesc}
{
error
}
\begin{excdesc}
{
error
}
Exception raised when a string passed to one of the functions here
Exception raised when a string passed to one of the functions here
is not a valid regular expression (e.g., unmatched parentheses) or
is not a valid regular expression (e.g., unmatched parentheses) or
...
@@ -482,6 +482,18 @@ Perform the same operation as \function{sub()}, but return a tuple
...
@@ -482,6 +482,18 @@ Perform the same operation as \function{sub()}, but return a tuple
Compiled regular expression objects support the following methods and
Compiled regular expression objects support the following methods and
attributes:
attributes:
\begin{methoddesc}
[RegexObject]
{
search
}{
string
\optional
{
, pos
}
\optional
{
,
endpos
}}
Scan through
\var
{
string
}
looking for a location where this regular
expression produces a match, and return a
corresponding
\class
{
MatchObject
}
instance. Return
\code
{
None
}
if no
position in the string matches the pattern; note that this is
different from finding a zero-length match at some point in the string.
The optional
\var
{
pos
}
and
\var
{
endpos
}
parameters have the same
meaning as for the
\method
{
match()
}
method.
\end{methoddesc}
\begin{methoddesc}
[RegexObject]
{
match
}{
string
\optional
{
, pos
}
\optional
{
,
\begin{methoddesc}
[RegexObject]
{
match
}{
string
\optional
{
, pos
}
\optional
{
,
endpos
}}
endpos
}}
If zero or more characters at the beginning of
\var
{
string
}
match
If zero or more characters at the beginning of
\var
{
string
}
match
...
@@ -503,18 +515,6 @@ attributes:
...
@@ -503,18 +515,6 @@ attributes:
searched for a match.
searched for a match.
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
[RegexObject]
{
search
}{
string
\optional
{
, pos
}
\optional
{
,
endpos
}}
Scan through
\var
{
string
}
looking for a location where this regular
expression produces a match, and return a
corresponding
\class
{
MatchObject
}
instance. Return
\code
{
None
}
if no
position in the string matches the pattern; note that this is
different from finding a zero-length match at some point in the string.
The optional
\var
{
pos
}
and
\var
{
endpos
}
parameters have the same
meaning as for the
\method
{
match()
}
method.
\end{methoddesc}
\begin{methoddesc}
[RegexObject]
{
split
}{
string,
\optional
{
,
\begin{methoddesc}
[RegexObject]
{
split
}{
string,
\optional
{
,
maxsplit
\code
{
= 0
}}}
maxsplit
\code
{
= 0
}}}
Identical to the
\function
{
split()
}
function, using the compiled pattern.
Identical to the
\function
{
split()
}
function, using the compiled pattern.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment