regex-group
Regex optional match in python fails
tickettypepat = (r\'MIS Notes:.*(//p//)?.*\') retype = re.search(tickettypepat,line) if retype: print retype.group(0)[详细]
2022-12-28 19:34 分类:问答C# - Lost in Regex - Matching groups on different machines
I\'ve thought I knew how to write basic regex. On my x64 pc in VS2008, C#, I\'m writing the following regex:[详细]
2022-12-20 20:47 分类:问答How can I store captures from a Perl regular expression into separate variables?
I have a regex: /abc(def)ghi(jkl)mno(pqr)/igs How would I capture the results of each parentheses into 3 different variables, one for each parentheses? Right now I using one array to capture all th[详细]
2022-12-20 15:40 分类:问答Dynamically Naming Groups in Python Regular Expressions
Is there a way to dynamically update the name of regex groups in Python? For ex开发者_JS百科ample, if the text is:[详细]
2022-12-15 21:23 分类:问答Why Group.Value always the last matched group string?
Recently, I found one C# Regex API really annoying. I have regular expression (([0-9]+)|([a-z]+))+. I want to find all matched string. The code is like below.[详细]
2022-12-14 03:37 分类:问答Is there a way to use a list of string parameters with a regular expression (with groups) to construct a new string?
Let\'s say for example that I have a regular expression like this: \"The quick (red|brown|blue|yellow) fox (jumps|leaps) over the lazy (dog|cat).\"[详细]
2022-12-12 23:08 分类:问答Regex to repair malformed XML attributes, removing spaces in tags
I\'ve been unfort开发者_开发百科unate to have come accross alot of malformed XML. I cannot get the correct regex to remove 2 spaces inside the attribute/key.[详细]
2022-12-07 21:59 分类:问答