regex-greedy
Regex - Greedyness - matching HTML tags, content and attributes
I am trying to match specific span-tags from an HTML source. The lang-attribute and the inner HTML of the tag are used as parameters for a function which returns a new string.[详细]
2023-02-16 01:10 分类:问答Python re.sub use non-greedy mode (.*?) with end of string ($) it comes greedy!
Code: str = \'<br><br />A<br />B\' print(re.sub(r开发者_如何转开发\'<br.*?>\\w$\', \'\', str))[详细]
2023-01-27 01:45 分类:问答How to get this regex working?
i have a small problem, i want to find in <tr><td>3</td><td>foo</td><td>2</td>开发者_Python百科[详细]
2023-01-14 16:36 分类:问答Preg match all greedy with exception for string
My source string is this: {categories group_id=\"3\"} {category_name} {/categories} {categories group_id=\"4\"}[详细]
2023-01-14 15:13 分类:问答Greedy Regex Matching
I\'m trying to match a string that looks something like this: <开发者_运维百科;$Fexample text in here>>[详细]
2023-01-14 10:38 分类:问答how to match a url non greedy
I am hoping that someone can help开发者_Go百科 me to make this match non greedy... I am using Javascript and ASP Classic[详细]
2023-01-07 00:11 分类:问答In regex is it called lazy or non-greedy? [duplicate]
This question already has answers here: What do 'lazy' and 'greedy' mean in the context of regular expressions?[详细]
2023-01-06 14:44 分类:问答I don't understand a regexp
I\'m following along a tutorial (Ruby) that uses a regex to remove all html tags from a string: product.description.gsub(/<.*?>/,\'\').[详细]
2023-01-05 10:55 分类:问答Lazy regex doesn't work as expected C#
I have the following regex: a?\\W*?b and I have a string ,.!,b When searching for a match I get ,.!,b, but not just b as I expect. Why is that? How to modify the regex to ge开发者_JAVA技巧t what I nee[详细]
2023-01-04 08:23 分类:问答Regex expression is too greedy
I\'m writing a regular expression to match data from the IMDb soundtracks data file.My regexes are mostly working, although they are in places slurping too much text into my named groups.Take the foll[详细]
2023-01-03 13:43 分类:问答