Hello,
The text parser I put receives the data from GPT but it doesn’t parse it.
I need it to parse
- Title:
- Description:
-Prompt 1
-Prompt 2
-Prompt 3
-Prompt 4
I use the below regex:
Title:\s*(.?)\r?\nDescription:\s(.?)\r?\nImage Prompts:\r?\n1.\s(.?)\r?\n2.\s(.?)\r?\n3.\s(.?)\r?\n4.\s(.*)
What am I missing? I am going nuts
Anyways.
I gave chatgpt the prompt:
Give me the regex that will parse the values no matter how the data comes in.
Updated the regex as follows as chatgpt suggests:
Title:\s*(.?)\s\r?\n\sDescription:\s(.?)\s\r?\n\sImage Prompts:\s\r?\n\s1.\s(.?)\s\r?\n\s2.\s(.?)\s\r?\n\s3.\s(.?)\s\r?\n\s4.\s(.*)
And it works now. No idea how but that’s fine 