Hi Jon,
In that case, if you do not know how many sets, we will have to use the “Global match” option.
Here is the updated pattern and instructions:
You can use a Text Parser “Match Pattern” module with this Pattern (regular expression):
#+.+\s+(?<paragraph>[^#]+)(?:\n\n|$)
Proof https://regex101.com/r/fbRnWd/1
Important Info
Global match must be set to YES!
Screenshot
Aggregate Matches
Then, you will need to combine the matches into a single bundle so you can map all of the matches at the same time.
Output

Module Export
You can copy and paste this module export into your scenario. This will paste the modules shown in my screenshots above.
-
Copy the JSON code below by clicking the copy button when you mouseover the top-right of the code block

-
Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the canvas.
-
Click on each imported module and save it for validation. You may be prompted to remap some variables and connections.
Click to Expand Module Export Code
JSON - Copy and Paste this directly in the scenario editor
{
"subflows": [
{
"flow": [
{
"id": 139,
"module": "util:ComposeTransformer",
"version": 1,
"parameters": {},
"mapper": {
"value": "## Column A (Heading)\nParagraph A (Content)\n\n## Column B (Heading)\n\nParagraph B (Content)\nParagraph B (Content)\nParagraph B (Content)\nParagraph B (Content)\n\n## Column C (Heading)\nParagraph C (Content)"
},
"metadata": {
"designer": {
"x": 2528,
"y": -1417
},
"restore": {},
"expect": [
{
"name": "value",
"type": "text",
"label": "Text"
}
]
}
},
{
"id": 140,
"module": "regexp:Parser",
"version": 1,
"parameters": {
"pattern": "#+.+\\s+(?<paragraph>[^#]+)(?:\\n\\n|$)",
"global": true,
"sensitive": true,
"multiline": false,
"singleline": false,
"continueWhenNoRes": false,
"ignoreInfiniteLoopsWhenGlobal": false
},
"mapper": {
"text": "{{139.value}}"
},
"metadata": {
"designer": {
"x": 2772,
"y": -1421
},
"restore": {
"parameters": {
"sensitive": {
"collapsed": true
},
"multiline": {
"collapsed": true
},
"singleline": {
"collapsed": true
},
"continueWhenNoRes": {
"collapsed": true
}
}
},
"parameters": [
{
"name": "pattern",
"type": "text",
"label": "Pattern",
"required": true
},
{
"name": "global",
"type": "boolean",
"label": "Global match",
"required": true
},
{
"name": "sensitive",
"type": "boolean",
"label": "Case sensitive",
"required": true
},
{
"name": "multiline",
"type": "boolean",
"label": "Multiline",
"required": true
},
{
"name": "singleline",
"type": "boolean",
"label": "Singleline",
"required": true
},
{
"name": "continueWhenNoRes",
"type": "boolean",
"label": "Continue the execution of the route even if the module finds no matches",
"required": true
},
{
"name": "ignoreInfiniteLoopsWhenGlobal",
"type": "boolean",
"label": "Ignore errors when there is an infinite search loop",
"required": true
}
],
"expect": [
{
"name": "text",
"type": "text",
"label": "Text"
}
],
"interface": [
{
"type": "text",
"name": "paragraph",
"label": "paragraph"
},
{
"type": "uinteger",
"name": "i",
"label": "i"
},
{
"type": "any",
"name": "__IMTMATCH__",
"label": "Fallback Match"
}
]
}
},
{
"id": 141,
"module": "builtin:BasicAggregator",
"version": 1,
"parameters": {
"feeder": 140
},
"mapper": {
"paragraph": "{{140.paragraph}}"
},
"metadata": {
"designer": {
"x": 3014,
"y": -1422,
"messages": [
{
"category": "last",
"severity": "warning",
"message": "A transformer should not be the last module in the route."
}
]
},
"restore": {
"extra": {
"feeder": {
"label": "Text parser - Match pattern [140]"
},
"target": {
"label": "Custom"
}
}
}
}
}
]
}
],
"metadata": {
"version": 1
}
}
Hope this helps! Let me know if there are any further questions or issues.
Join the Make Fans Discord server to chat with other makers!