Last active
January 24, 2017 10:22
-
-
Save davebrny/a440ce36d11364d2f7cfc6d89d2f3f63 to your computer and use it in GitHub Desktop.
(autohotkey) - split between two characters/words/sentences
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
between(string, left, right) { | |
if (strLen(left) > 1) ;# if its a word or sentence | |
{ | |
string := strReplace(string, left, "¢") ; replace with symbol | |
left := "¢" ; set new deliminator | |
} | |
if (strLen(right) > 1) | |
{ | |
string := strReplace(string, right, "¢") | |
right := "¢" | |
} | |
stringSplit, split, string, % left ;# if its a single character | |
stringSplit, split, split2, % right | |
return split1 | |
} | |
/* | |
[script info] | |
version = 0.2 | |
description = split between two characters/words/sentences | |
author = davebrny | |
source = https://gist.github.com/davebrny/a440ce36d11364d2f7cfc6d89d2f3f63 | |
*/ |
Author
davebrny
commented
Jan 24, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment