Sign in to follow this  
Followers 0
jeantje

HEX ? CHARS

3 posts in this topic

I have a question if i use a hex like 39D54BDB00AC76FD794C382C36FAE27403 and i need to compare it with 39??4BDB00AC76F??94??82C??FAE27403 and that is valid how can i use the ?? as a key for any hex character


Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Dim $sKey1 = '39D54BDB00AC76FD794C382C36FAE27403'
Dim $sKey2 = '39[A-Z0-9]+4BDB00AC76F[A-Z0-9]+94[A-Z0-9]+82C[A-Z0-9]+FAE27403'

If StringRegExp($sKey1, $sKey2) Then
    MsgBox(0x40, 'Title', 'Success')
Else
    MsgBox(0x10, 'Title', 'Failure')
EndIf

$sKey1 = '39D54BDB00AC76FD794C382C36FAE274'
$sKey2 = '39[A-Z0-9]+4BDB00AC76F[A-Z0-9]+94[A-Z0-9]+82C[A-Z0-9]+FAE27403'

If StringRegExp($sKey1, $sKey2) Then
    MsgBox(0x40, 'Title', 'Success')
Else
    MsgBox(0x10, 'Title', 'Failure')
EndIf


$sKey1 = '39D54BDB00AC76FD794C382C36FAE2740300'
$sKey2 = '39[A-Z0-9]+4BDB00AC76F[A-Z0-9]+94[A-Z0-9]+82C[A-Z0-9]+FAE27403'

If StringRegExp($sKey1, $sKey2) Then
    MsgBox(0x40, 'Title', 'Success')
Else
    MsgBox(0x10, 'Title', 'Failure')
EndIf

You can also split the string to '' which will split the string for each character..

Edit: You can try something like this if you want it to be at the start and end of the string as well as restricting the [A-Z0-9] to only two characters:

Dim $sKey2 = '^39[A-Z0-9]{2}4BDB00AC76F[A-Z0-9]{2}94[A-Z0-9]{2}82C[A-Z0-9]{2}FAE27403$'

Edited by Authenticity

Share this post


Link to post
Share on other sites

Dim $sKey1 = '39D54BDB00AC76FD794C382C36FAE27403'
Dim $sKey2 = '39[A-Z0-9]+4BDB00AC76F[A-Z0-9]+94[A-Z0-9]+82C[A-Z0-9]+FAE27403'

If StringRegExp($sKey1, $sKey2) Then
    MsgBox(0x40, 'Title', 'Success')
Else
    MsgBox(0x10, 'Title', 'Failure')
EndIf

$sKey1 = '39D54BDB00AC76FD794C382C36FAE274'
$sKey2 = '39[A-Z0-9]+4BDB00AC76F[A-Z0-9]+94[A-Z0-9]+82C[A-Z0-9]+FAE27403'

If StringRegExp($sKey1, $sKey2) Then
    MsgBox(0x40, 'Title', 'Success')
Else
    MsgBox(0x10, 'Title', 'Failure')
EndIf


$sKey1 = '39D54BDB00AC76FD794C382C36FAE2740300'
$sKey2 = '39[A-Z0-9]+4BDB00AC76F[A-Z0-9]+94[A-Z0-9]+82C[A-Z0-9]+FAE27403'

If StringRegExp($sKey1, $sKey2) Then
    MsgBox(0x40, 'Title', 'Success')
Else
    MsgBox(0x10, 'Title', 'Failure')
EndIf

You can also split the string to '' which will split the string for each character..

Edit: You can try something like this if you want it to be at the start and end of the string as well as restricting the [A-Z0-9] to only two characters:

Dim $sKey2 = '^39[A-Z0-9]{2}4BDB00AC76F[A-Z0-9]{2}94[A-Z0-9]{2}82C[A-Z0-9]{2}FAE27403$'

Thank you very much Authenticity

Greetings Jeantje


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0