RE绝望 - 需要帮助 [英] RE Despair - help required

查看:89
本文介绍了RE绝望 - 需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试以下方法:


re.search(r''\\\ [^" \\] +(?=("?$ ))''," c:\ret_files")


我收到NoneType的回报,我不明白为什么。我知道我在这里错过了一些东西,但我真的不知道为什么(我敢打赌它是'b $ b b b b)。我也在KODOS上尝试了这个RE,它工作得很好

那里,所以我真的很困惑。


有什么想法吗?

谢谢。

I am trying the following:

re.search(r''\\[^"\\]+(?=("?$))'', "c:\ret_files")

and I get a return of NoneType, and I have no idea why. I know that I
missing something here, but I really can''t figure out why (I bet it''s
something obvious). I also tried this RE on KODOS and it works fine
there, so I am really puzzled.

Any ideas?
Thanks.

推荐答案

))''," c:\ _ id_files")


和我得到了NoneType的回报,我不明白为什么。我知道我在这里错过了一些东西,但我真的不知道为什么(我敢打赌它是'b $ b b b b)。我也在KODOS上尝试了这个RE,它工作得很好

那里,所以我真的很困惑。


有什么想法吗?

谢谢。
))'', "c:\ret_files")

and I get a return of NoneType, and I have no idea why. I know that I
missing something here, but I really can''t figure out why (I bet it''s
something obvious). I also tried this RE on KODOS and it works fine
there, so I am really puzzled.

Any ideas?
Thanks.


Yoav启发我们:
我正在尝试以下方法:

re.search(r' '\\ [^" \\] +(?=("?
I am trying the following:

re.search(r''\\[^"\\]+(?=("?


))''," c:\ _对象")

我得到了NoneType的回报,我不明白为什么。


因为你不匹配回车符号\ r。

我知道我在这里遗漏了一些东西,但我真的可以'找不到
为什么(我打赌这是明显的事情)。
))'', "c:\ret_files")

and I get a return of NoneType, and I have no idea why.
Because you don''t match a carriage return "\r".
I know that I missing something here, but I really can''t figure out
why (I bet it''s something obvious).




使用正斜杠而不是反斜杠。并且唠叨

Microsoft使用最广泛使用的转义字符作为路径

分隔符...


Sybren

-

世界的问题是愚蠢。并不是说应该对愚蠢的死刑进行处罚,但为什么我们不要仅仅拿掉

安全标签来解决问题呢? br />
Frank Zappa



Use forward slashes instead of backward slashes. And go nag at
Microsoft for using the most widely used escape character as a path
separator...

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don''t we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa


这篇关于RE绝望 - 需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆