English 中文(简体)
标签:的问答
在 Python 中查找包含一定数量某些字符的子字符串
原文:Regex expression to find the substring that contains certain amount of certain characters with Python

我有一个像"GGACATCGGGGGGGGATGGGGGAC"这样的字符串, 我怎样才能找到所有子字符串, 例如, 包含三个 Gs 的, 任何顺序? 对于这个字符串, 它会是 GGGGG或 GGGGGGGG GGGGGGGGGGGGTGGGGGGGGTGGGGGGGGGGDGGDGGGDGGGDGGGGGGGGGGGGGGGGGAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG

如何获得数字
原文:How to get numbers

myPattern = @"?:[.]?[d]+(?:[,.]*d)*"; However, I would like to exclude the numbers following the dollar sign ($), and want to exclude numbers in parentheses (){}[]. For example: input ...

热门标签