Einzelnen Beitrag anzeigen

Benutzerbild von mirage228
mirage228

Registriert seit: 23. Mär 2003
Ort: Münster
3.750 Beiträge
 
Delphi 2010 Professional
 
#9

Re: [PCRE] Separatoren als Subexpressions

  Alt 20. Okt 2005, 16:38
Hi,

stimmt Du hast recht, die Matches sind immer an einer anderen Stelle, hatte ich nicht bedacht.

So, damit
Code:
((.+?)(\:|\#|$))
siehts so aus:
Code:
3 matches made in submitted text.
Matches for 1:2#3 : [1:]@0:2
Match[0] = '1:'
Match[1] = '1:'
Match[2] = '1'
Match[3] = ':'

Matches for 1:2#3 : [2#]@2:2
Match[0] = '2#'
Match[1] = '2#'
Match[2] = '2'
Match[3] = '#'

Matches for 1:2#3 : [3]@4:1
Match[0] = '3'
Match[1] = '3'
Match[2] = '3'
Match[3] = ''
Das sollte besser sein

mfG
mirage228
David F.

May the source be with you, stranger.
PHP Inspection Unit (Delphi-Unit zum Analysieren von PHP Code)
  Mit Zitat antworten Zitat