How to split a group of words?
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-12-12 02:52 AM
2017-12-12
02:52 AM
test="中文English123"
Change into
test1="中文"
test2="English"
test3= "123"
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-12-13 12:17 AM
2017-12-13
12:17 AM
Parsing or breaking up a string into words is easier if there is a space or punctuation symbol between words, but in your case the split or parse is based on finding a character that is not in the same set as the first character that you want matched/grouped. Same type of process though.
You have to program this with a loop that iterates through the string and builds an array of the parsed/matched words from your original string. GDL is very close to the old BASIC language - not exactly, but close enough. You can find many examples on the web of parsing strings.
You want to look at the GDL Reference Manual, in the chapter Expressions and Functions > String Functions
You have to program this with a loop that iterates through the string and builds an array of the parsed/matched words from your original string. GDL is very close to the old BASIC language - not exactly, but close enough. You can find many examples on the web of parsing strings.
You want to look at the GDL Reference Manual, in the chapter Expressions and Functions > String Functions
AC 28 USA and earlier • macOS Sequoia 15.3.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB