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
895aa9da
Kaydet (Commit)
895aa9da
authored
Nis 18, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Suggestion from Keith Briggs: refer to RE objects consistently instead of
introducing a new term ("regex") without defining it.
üst
da3dc5b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
libre.tex
Doc/lib/libre.tex
+9
-10
No files found.
Doc/lib/libre.tex
Dosyayı görüntüle @
895aa9da
...
@@ -391,7 +391,7 @@ result = re.match(pat, str)
...
@@ -391,7 +391,7 @@ result = re.match(pat, str)
but the version using
\function
{
compile()
}
is more efficient when the
but the version using
\function
{
compile()
}
is more efficient when the
expression will be used several times in a single program.
expression will be used several times in a single program.
%(The compiled version of the last pattern passed to
%(The compiled version of the last pattern passed to
%\function{re
gex.match()} or \function{regex
.search()} is cached, so
%\function{re
.match()} or \function{re
.search()} is cached, so
%programs that use only a single regular expression at a time needn't
%programs that use only a single regular expression at a time needn't
%worry about compiling regular expressions.)
%worry about compiling regular expressions.)
\end{funcdesc}
\end{funcdesc}
...
@@ -514,9 +514,8 @@ replacement string. For example:
...
@@ -514,9 +514,8 @@ replacement string. For example:
'pro--gram files'
'pro--gram files'
\end{verbatim}
\end{verbatim}
The pattern may be a string or a
The pattern may be a string or an RE object; if you need to specify
regex object; if you need to specify
regular expression flags, you must use a RE object, or use
regular expression flags, you must use a regex object, or use
embedded modifiers in a pattern; e.g.
embedded modifiers in a pattern; e.g.
\samp
{
sub("(?i)b+", "x", "bbbb BBBB")
}
returns
\code
{
'x x'
}
.
\samp
{
sub("(?i)b+", "x", "bbbb BBBB")
}
returns
\code
{
'x x'
}
.
...
@@ -623,7 +622,7 @@ Identical to the \function{subn()} function, using the compiled pattern.
...
@@ -623,7 +622,7 @@ Identical to the \function{subn()} function, using the compiled pattern.
\begin{memberdesc}
[RegexObject]
{
flags
}
\begin{memberdesc}
[RegexObject]
{
flags
}
The flags argument used when the
regex
object was compiled, or
The flags argument used when the
RE
object was compiled, or
\code
{
0
}
if no flags were provided.
\code
{
0
}
if no flags were provided.
\end{memberdesc}
\end{memberdesc}
...
@@ -634,7 +633,7 @@ symbolic groups were used in the pattern.
...
@@ -634,7 +633,7 @@ symbolic groups were used in the pattern.
\end{memberdesc}
\end{memberdesc}
\begin{memberdesc}
[RegexObject]
{
pattern
}
\begin{memberdesc}
[RegexObject]
{
pattern
}
The pattern string from which the
regex
object was compiled.
The pattern string from which the
RE
object was compiled.
\end{memberdesc}
\end{memberdesc}
...
@@ -732,14 +731,14 @@ Note that if \var{group} did not contribute to the match, this is
...
@@ -732,14 +731,14 @@ Note that if \var{group} did not contribute to the match, this is
\begin{memberdesc}
[MatchObject]
{
pos
}
\begin{memberdesc}
[MatchObject]
{
pos
}
The value of
\var
{
pos
}
which was passed to the
The value of
\var
{
pos
}
which was passed to the
\function
{
search()
}
or
\function
{
match()
}
function. This is the index
into
\function
{
search()
}
or
\function
{
match()
}
function. This is the index
the string at which the regex
engine started looking for a match.
into the string at which the RE
engine started looking for a match.
\end{memberdesc}
\end{memberdesc}
\begin{memberdesc}
[MatchObject]
{
endpos
}
\begin{memberdesc}
[MatchObject]
{
endpos
}
The value of
\var
{
endpos
}
which was passed to the
The value of
\var
{
endpos
}
which was passed to the
\function
{
search()
}
or
\function
{
match()
}
function. This is the index
into
\function
{
search()
}
or
\function
{
match()
}
function. This is the index
the string beyond which the regex
engine will not go.
into the string beyond which the RE
engine will not go.
\end{memberdesc}
\end{memberdesc}
\begin{memberdesc}
[MatchObject]
{
lastgroup
}
\begin{memberdesc}
[MatchObject]
{
lastgroup
}
...
...
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