Hi there, it has been a long time since i came here
First of all, idk if this is the right section, feel free to move this thread
So, today i was having fun learning RegEx, and to train myself, i did the regex for serious sam tag
Here it is, I hope there is still some programmer around and this could help doing something , i would like to do a new NameEditor (with cool stuffs like an integrated fader) some time ago but i've not time
Easy usage under python ( )Code:(\^c\w{0,6}|\^[CFiIbBAr]|\^f[0-9]|\^a\w{2}|[^^]\w*)
Should be pretty easy to do it with other languages (Java,C etc), but i hate them, so ...Code:>>> s = "^i^b^c000080^f2Provo^B^C^I^F^a88^c400040ca^Atio^rn" >>> print s '^i^b^c000080^f2Provo^B^C^I^F^a88^c400040ca^Atio^rn' >>> test = re.compile(r"(\^c\w{0,6}|\^[CFiIbBAr]|\^f[0-9]|\^a\w{2}|[^^]\w*)", re.DOTALL) >>> l = test.findall(s) >>> print l ['^i', '^b', '^c000080', '^f2', 'Provo', '^B', '^C', '^I', '^F', '^a88', '^c400040', 'ca', '^A', 'tio', '^r', 'n'] >>> tag = ''.join([ i for i in l if i[0] != "^" ]) >>> print tag 'Provocation' >>>
PS: I had to download the NameEditor and i pleasantly noticed the my TagFader is pretty much downloaded