-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<string> split at <string> doesn't work; while split <string> at <string> works #719
Comments
I can confirm this, for some reason, the first pattern doesn't accept literals. |
That's interesting, I've never been able to split string literals because I always use the first syntax and I assumed it was just a limitation of the expression for whatever reason. |
Hmm, this is weird... I hope it is just a typo and no spaghetti parser bug. |
more info on this: it happens any time a string literal is the start of a pattern. Even if you don't take in a literal string, for example, |
you can surround the string in () like ("Abc") to fix this, credit to @Blueyescat for finding the workaround. Maybe that will help you if you work on this issue @bensku |
The syntax
<string> split at <string>
doesn't work when splitting an explicit string, such asset {_test::*} to "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday" split at ","
However, using the alternative syntax
split <string> at <string>
such asset {_test::*} to split "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday" at ","
or a string variable
set {_test::*} to {_weekdays} split at ","
works.
The text was updated successfully, but these errors were encountered: