Bug? Split fails when using ? as the parse char

Discussion in 'Bugs & wishlist' started by JakeBullet70, Aug 8, 2015.

  1. JakeBullet70

    JakeBullet70 Well-Known Member Licensed User

    Code:
    Dim arrMap() As String =  Regex.Split("?","573?571?573?585?577?574?574?589?581?579?582")
    Why does this code fail?
     
  2. JakeBullet70

    JakeBullet70 Well-Known Member Licensed User

    Not a bug... [?] works. I was thinking a normal split function but this is based off of regular expressions.

    I need more sleep...
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    This is indeed not a bug as ? should be escaped:
    \?
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice