| View previous topic :: View next topic |
| Author |
Message |
Sergio
Joined: 16 Mar 2008 Posts: 25 Location: Brooklyn
|
Posted: Sun Mar 30, 2008 7:51 am Post subject: Erasing Enter keys |
|
|
The following code removes a character (spaces) from a string of text on my clipboard
| Code: | | StringReplace, clipboard, clipboard, `r`n, , All |
How would I remove 2 different characters from my text at once. Assuming those characters were a space, and enter? _________________
 |
|
| Back to top |
|
 |
k3ph
Joined: 21 Jul 2006 Posts: 123
|
Posted: Sun Mar 30, 2008 9:26 am Post subject: |
|
|
well, in hex way:
space = 20
enter = 0D 0A
A = "this 'nis 'na 'ntest" (where 'n = new line)
| Code: | | EF BB BF 74 68 69 73 20 0D 0A 69 73 20 0D 0A 61 20 0D 0A 74 65 73 74 |
B = "this is a test"
| Code: | | EF BB BF 74 68 69 73 69 73 61 74 65 73 74 |
A -> B AHK example:
| Code: | feed := "EF BB BF 74 68 69 73 20 0D 0A 69 73 20 0D 0A 61 20 0D 0A 74 65 73 74"
output:= RegExReplace(feed, "20 0D 0A ", "")
MsgBox %feed%`n%output%
return |
|
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 556 Location: MN, USA
|
|
| Back to top |
|
 |
|