Loading ...
Sorry, an error occurred while loading the content.

matchlist 10 elements bug ?

Expand Messages
  • Marc Chantreux
    hi all, its seems like matchit always returns 10 elements (as in exemple). So how to make the difference between a 0 width submatch and an autofilled cell?
    Message 1 of 1 , Jan 3, 2007
    • 0 Attachment
      hi all,

      its seems like matchit always returns 10 elements (as in exemple). So
      how to make the difference between a 0 width submatch and an autofilled
      cell?

      regards
      mc

      let text ='xml:lang="fr"'
      let s:regExpAttr =
      '\v(%([[:alpha:]][[:alnum:]]*){0,1})(%(:){0,1})(%([[:alpha:]][[:alnum:]]*){0,1})'

      let i = 0
      for x in matchlist( text , s:regExpAttr )
      echo i . ': >'.x.'<'
      let i+=1
      endfor

      0: >xml:lang<
      1: >xml<
      2: >:<
      3: >lang<
      4: ><
      5: ><
      6: ><
      7: ><
      8: ><
      9: ><
    Your message has been successfully submitted and would be delivered to recipients shortly.