Home > Net >  About Regex this expression, there is a great god under help to dispel doubts, thank you.
About Regex this expression, there is a great god under help to dispel doubts, thank you.

Time:10-10

Want to know what mean this expression?

The Regex Regex=new Regex (" (? . +)? : (? . +).?" ) ;

CodePudding user response:

The concept of matching set of http://deerchao.net/tutorials/regex/regex-1.htm

CodePudding user response:

Sure didn't write wrong, with JS tried down is an error

CodePudding user response:

As if is a problem of JS, c # can, that is, matching "Key: Value", get the Key and the Value of the content

CodePudding user response:

Sorry, forget to indicate that c # development environment


reference togamilight reply: 3/f
as JS, c #, is match "Key: Value", get the Key and the Value of content

CodePudding user response:

The
reference 4 floor HiWalker reply:
sorry, forget to specify, is a c # development environment


Quote: refer to the third floor togamilight response:

As if is a problem of JS, c # can, that is, matching "Key: Value", get the Key and the Value of content


I know it's c #, just for the sake of convenient use JS test the regular expression, but doesn't seem to support, JS complains

CodePudding user response:

I'm into the match as long as there is under: (

CodePudding user response:

` ` `
# as long as there is: just add any character
A

` ` `

The regular use by grouping, group name,? Matching number

CodePudding user response:

The two groups, the key and the value
Is the key. + the value too. + middle: separated
  •  Tags:  
  • C#
  • Related