Sign in to follow this  
Followers 0
duketrapp

Regexp Need Help

8 posts in this topic

hi folks..

im tryin to use the StringRegExp and StringRegExpReplace functions but dont get it work... i dont get a errorfree pattern...

i just want clear my CmdLineRaw from any chars exept "\", "-", "_", """, "'" and all blank chars, cause my script runs in errors, when chars like ":" or "/" are in the CmdLine...

StringRegExpReplace should replace the not wanted chars into "_"... like StringRegExpReplace ( CmdLineRaw, "pattern", "_")...

.. i tried realy hard to find the right pattern and googled around but i dont get it work..

..maybe u can help me out..

..salute

Share this post


Link to post
Share on other sites



This:

$testcmdline = StringRegExpReplace($CmdLineRaw,"[^a-zA-Z0-9ÄÖÜäöüß\-_."&Chr(34)&" ]","")

..works great now... BUT.. please tell me what ASCII code is this character >>> ' <<<... its the sign on the same key as #...

..cant find the code for it . :think:

Share this post


Link to post
Share on other sites

This:

$testcmdline = StringRegExpReplace($CmdLineRaw,"[^a-zA-Z0-9ÄÖÜäöüß\-_."&Chr(34)&" ]","")

..works great now... BUT.. please tell me what ASCII code is this character >>> ' <<<... its the sign on the same key as #...

..cant find the code for it . :think:

Do you mean just a single quote?

Opening:

Chr(96)

Closing:

Chr(39)


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Do you mean just a single quote?

Mhhh.. I dont know.. isnt single quote this: ` ´ ?

..i mean this: '

...the char that is on same key with #

maybe it is.. ill check out.. didnt know that there is an open an close ... for same char...

Edited by duketrapp

Share this post


Link to post
Share on other sites

Mhhh.. I dont know.. isnt single quote this: ` ´ ?

..i mean this: '

...the char that is on same key with #

maybe it is.. ill check out.. didnt know that there is an open an close ... for same char...

if you go to the autoit helpfile, go to the index tab, and start typing 'ascii characters' it will be the second option by the time you've typed 'asc' that will give you the ascii values you're looking for (and even alot that you're not)

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Mhhh.. I dont know.. isnt single quote this: ` ´ ?

..i mean this: '

...the char that is on same key with #

maybe it is.. ill check out.. didnt know that there is an open an close ... for same char...

Yeah man I'm lost... I don't have another key for/with #.

Guess you could try this and see if what you want is there:

For $x = 1 To 255
    ConsoleWrite('Chr(' & $x & ') = ' & Chr($x) & @LF)
Next

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Yeah man I'm lost... I don't have another key for/with #.

Guess you could try this and see if what you want is there:

For $x = 1 To 255
    ConsoleWrite('Chr(' & $x & ') = ' & Chr($x) & @LF)
Next
or just check out the help file so you can see the non printing characters too... :(:think:

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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