What are you trying to achieve?
Split an answer from ChatGPT in to different columns in a GoogleSheet
Steps taken so far
I get the answer and each part I want to isolate starts with X (there are 3 columns I want to fill)
Split an answer from ChatGPT in to different columns in a GoogleSheet
I get the answer and each part I want to isolate starts with X (there are 3 columns I want to fill)
Hey Eric,
this wont work since X is at the start, not at the end of each string. Try splitting by new line instead. Or use a text parser module to get the strings between X and newline.
Welcome to the Make community!
You can use a Text Parser “Match Pattern” module with this Pattern (regular expression):
\*X\* (?<text>.+)
Proof https://regex101.com/r/1disep/1
For more information, see Text Parser in the Make Help Center:
Match Pattern
The Match pattern module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a regular expression (aka regex or regexp), which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.
- The complete list of metacharacters can be found on the MDN web docs website.
- For a tutorial on how to create regular expressions, we recommend the RegexOne website.
- For an easy, quick regex generator, try the Regular Expressions generator.
- For experimenting with regular expressions, we recommend the regular expressions 101 website. Just make sure to tick the ECMAScript (JavaScript) FLAVOR in the left panel.
Then,
Every result (item/record) from trigger/iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.
Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module.
For more information, on mapping items in an array, see “Mapping with arrays” below:
Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —
parseDate
| tokens for formatDate
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.