Is it possible to use Regex through Hexadecimal to find email addresses

Posted by LukeJenx on Stack Overflow See other posts from Stack Overflow or by LukeJenx
Published on 2012-11-02T22:37:50Z Indexed on 2012/11/02 23:01 UTC
Read the original article Hit count: 373

Filed under:
|
|

Not sure if this is even possible but I have been looking at using Regex to get an email address that is in Hex. Basically this is to build up some of my automated forensic tools but I am having problems on making a suitable Regex algorithm.

Regex for email: /^([a-z0-9_.-]+)@([\da-z.-]+).([a-z.]{2,6})$/

Hex values:

@ = 40
. = 2E
.com = 636f6d
_ = 5f
A/a = 41/61 [1]
Z/z = 5a/7a
- = 2d

This is what I have got at the moment (it only takes into account lower case and .com). But it doesn't work! Have I messed something simple up?

"/^([61-7a]+)40([61-7a]+)23(636f6d)$/"

[1] I know email can only be lower case but I need to take uppercase into account too.

© Stack Overflow or respective owner

Related posts about python

Related posts about regex