Hi. I have a Regex Command as follows that looks for "Title: " and then extracts the text afterwards. My current command only gets the first word, however I would like to get the rest of the line as the title may be multiple words. I have also included a secondary expression which worked when I tested in on regex101 however when it runs it gets all text after the "Title: " which includes the rest of the original extracted text.
Is there a command that goes up to the next Line Feed / Carriage Return?
My other option is to extract test after "Title: " and before "Attention: ".
Any thoughts on what is the better option? Also, not sure how to do Option 2.
Thanks
Craig…
Sample Text
Title: Consultation Title Goes Here
Attention:
Summary
<A brief description of what is out for Consultation
Hi @Yoichi . That is exactly what I’m wanting to extract, however when I run this in Studio it continues to extract all text after the parts that are highlighted “Consultation Title Goes Here”.
Your secondary expression should be working. Could you check if you happen to have the “Singleline” option checked? Based on what you’re describing it appears that that option is currently enabled, resulting in all text in all lines being captured, as opposed to stopping at new line.
Hi @Yoichi . This is a cut-down version of the output that came from my original file and it used as the input for the regex command. output.txt (584 Bytes)
Thank you for sharing. This txt file’s linebreak is CR (0x0D) (Old Mac style linebreak). So we need to use the following pattern, for example. Can you try this?