Var str_eaxm=Regex. Split (sExample_str, "[' \] * [], [] * [' \]"). ToList ()
Hope leaders can give me answers, this sentence is what meaning, especially in the middle of this a few symbols,
CodePudding user response:
Regular expression character segmentationThe second parameter of the so-called several symbols is a regular expression
Reference: https://www.runoob.com/regexp/regexp-syntax.html
CodePudding user response:
Matching', '
Or
', '
CodePudding user response:
With ' or " beginning at the end of the middle there is a , andColumns such as
', '
", "
', "
Can be matched
CodePudding user response:
Var str_eaxm=Regex. Split (sExample_str, "[' \] * [], [] * [' \]"). ToList ()Remove after the escape character, regular expressions are as follows:
[' "] * [], [] * [' "]
[] said scope, the matching between any content of a
[' "] can match a single or a double quote
[] * among only a space, space, only * number of 0 ~ up, can be any number of Spaces, including 0 (no Spaces)
, basic text, comma
[] * among only a space, space, only * number of 0 ~ up, can be any number of Spaces, including 0 (no Spaces)
[' "] can match a single or a double quote
This is your interpretation of the expression
To:
", "
", "
', '
', "
As a delimiter text segmentation
Can use this expression to optimize
[' ['] *, "*"]