This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术讨论 / Is there anyone expert at Regular Expression. If I want match a line starts with '*', what's the patten?
It can have white spaces before the '*'.
-ding_ding(丁_丁);
2009-6-12
(#5337641@0)
-
^\x20*\*
-fightintoronto(再战);
2009-6-12
(#5337706@0)
-
Thanks very much, what's the char x20 means?
-ding_ding(丁_丁);
2009-6-12
(#5337766@0)
-
\x20 是空格。别忘了最前面的反斜杠。
-fightintoronto(再战);
2009-6-12
(#5337783@0)
-
Thanks, another question:
Here is the patten for single and double quoted string, r'"([^\\"]+|\\.)+"' + r"|'([^\\']+|\\.)+'"
but it only match the first one in the line, how can I make it match all the quoted strings?
Thanks
-ding_ding(丁_丁);
2009-6-12
(#5337840@0)
-
Found the problem, the patten is OK, it's the problem of the code use the patten.
-ding_ding(丁_丁);
2009-6-12
(#5337963@0)