471,336 Members | 1,234 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

Problems with regular expressions

I have the next piece of code:

------------------------------------------------------------------------
if re.search('^(taskid|bugid):\\d+',logMessage):
return 0
else:
sys.stderr.write("El comentario tiene que contener el taskid:#### o el bugid:####")
return 1
-------------------------------------------------------------------------

The regular exprexión is "^(taskid|bugid):\\d+"

Mi problem is that if logMessage == "taskid:234" the regular expression matched teorically, but the result is always "None" and the function returns 1.

¿Does anybody has an idea of what is happening here?

Thanks
Jun 15 '07 #1
0 723

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Saira | last post: by
2 posts views Thread by Sehboo | last post: by
4 posts views Thread by Együd Csaba | last post: by
7 posts views Thread by Billa | last post: by
3 posts views Thread by a | last post: by
13 posts views Thread by Wiseman | last post: by
12 posts views Thread by FAQEditor | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.