c# - Split a string with '[' and ']' -
i know regex split pattern (using c#) string packed [
, ]
.
for example, string:
this [word1] , [word2]
i should word1
, word2
.
the following should trick:
\[(?<word>[^\]]*)\]
i suggest use regex tool assist you. i'm sure there couple use expresso , helps these pesky things :)
Comments
Post a Comment