Tags » Steve Armstrong

Is there a tmpreaper that reads from a group of conf files

Logrotate is really nice because each component that wants to have logs rotated just need to drop a file in /etc/logrotate.d, and the daemon reads from all of them. 99 more words

Python regex matches string it shouldn't

I’m totally lost at how this regex matches this string in python. Could someone make sense of it please?

import re
regex = "^PHP/5.\\{3|2\\}.\\{1|2|3|4|5|6|7|8|9|0\\}\\{1|2|3|4|5|6|7|8|9|0\\}$"
ua = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)'
re.compile(regex).search(ua)
… 31 more words
Recent Questions - Stack Overflow