This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOTE: Each RegEx is a single line and Java users, for example, need to mind Java's additional requirements (such as escaping escape characters), otherwise they should work in every RegEx flavor. | |
This code ain't my work originally, I modified it. | |
------------------------------------------------------------------------- | |
No support to get the individual sections: | |
``` | |
(?:[1-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.(?:[1-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.(?:[1-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.(?:[1-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]) | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="metadata"> | |
<h2> | |
<a href="http://evil-m.deviantart.com/art/Memories-of-a-Warlord-679806065">Memories of a Warlord</a> | |
</h2> | |
<p class="mavatar"> | |
<a target="_self" href="http://evil-m.deviantart.com/"><img class="avatar" src="http://a.deviantart.net/avatars/e/v/evil-m.jpg?11" alt=":iconevil-m:" title="Evil-M"></a> | |
</p> | |
<ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This function is a direct Python 2.7+ translation of | |
https://gist.github.com/mailtruck/2411659 | |
Will exit if executed without importing. | |
--rautamiekka | |
""" | |
if __name__ == '__main__': | |
from sys import exit as sysexit | |
sysexit(1) |