Locked Can't find a suitable title for this

  • Tuesday, March 13, 2012 9:34 AM
     
      Has Code

    In Powershell:

    PS C:\> '12345678901234567890' -match '(234).*?(234)(.*?)'
    True
    PS C:\> $matches
    
    Name                           Value
    ----                           -----
    3
    2                              234
    1                              234
    0                              2345678901234
    
    
    PS C:\> $matches[3].Length
    0

    Why is $matches[3] an empty string?  Should it not be '567890'?

    Thanks.

All Replies