Hello everyone, really tried my best with this one haha. Wanted to ask for help on RegEx for this setup.
the prompt RegEx is not taking characters after a space
here’s my Regex
File in CU: (?<File>[\w\W]+?)\s+Prompt: (?<prompt>[\w\W]+?)\s+
Hello everyone, really tried my best with this one haha. Wanted to ask for help on RegEx for this setup.
the prompt RegEx is not taking characters after a space
here’s my Regex
File in CU: (?<File>[\w\W]+?)\s+Prompt: (?<prompt>[\w\W]+?)\s+
Hey there,
you mean its missing the " nothing" part?
Maybe something like this?
File in CU: (?<File>.+)\r?\nPrompt: (?<prompt>.+)
Will there be any more text that needs to be omitted after the Prompt?
Helloo yes sorry for the vauge samples, but basically there might be a long text after Prompt:
You should not be using a lazy matching operator ?
if you want to select all the rest of the text.
e.g.:
File in CU:\s*(?<File>[\w\W]+?)\s+Prompt:\s*(?<prompt>[\w\W]+)$
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
Worked perfectly! Thank you