I apologize if this is somewhere within the 500 pages of the Forum, but..
I have this sample text:
@HEADER
From :
Dr. AM
Editor-in-Chief
Email: am@abc.org
@HEADER-END
**end sample text**
I want to Find all text between @HEADER and @HEADER-END, inclusive.
I tried:
@HEADER\n[.*\n]*@HEADER-END$
I am using Textpad, but it doesn't seem to translate over multiple lines.
The text in between, of course, can be an unspecified number of lines.
Thank you in advance
Finding Text between multiple lines and within Desired Text
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Yes, this has been discussed many times before.
TextPad's aged regular expression engine is incapable of matching text containing an arbitrary number of newlines.
If your input is not too long, you could change the newlines to something else, do your stuff, then change them back.
Or you could record a macro that extends the selection from the beginning of the wanted text to its end, and do your stuff on the selected text.
Alternatively, you could try WildEdit (http://www.textpad.com/products/wildedit/), which uses a far more powerful regular expression engine.
TextPad's aged regular expression engine is incapable of matching text containing an arbitrary number of newlines.
If your input is not too long, you could change the newlines to something else, do your stuff, then change them back.
Or you could record a macro that extends the selection from the beginning of the wanted text to its end, and do your stuff on the selected text.
Alternatively, you could try WildEdit (http://www.textpad.com/products/wildedit/), which uses a far more powerful regular expression engine.
So how do I achieve this using WildEdit?ben_josephs wrote:Yes, this has been discussed many times before.
TextPad's aged regular expression engine is incapable of matching text containing an arbitrary number of newlines.
If your input is not too long, you could change the newlines to something else, do your stuff, then change them back.
Or you could record a macro that extends the selection from the beginning of the wanted text to its end, and do your stuff on the selected text.
Alternatively, you could try WildEdit (http://www.textpad.com/products/wildedit/), which uses a far more powerful regular expression engine.
Thank you.
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
I want to replace this...ben_josephs wrote:Please describe precisely what you what to find and what you want to do with it.
Code: Select all
CURSOR A IS
SELECT
ORDER_NUMBER, STORE_NUM, CV, ACTIVITY_DATE, ACTIVITY_TYPE, SERVICE_NUMBER, ACTIVITY_DESC,
ACTIVITY_STATUS, ACTIVITY_ID, ACTIVITY_GROUP, ACTIVITY_COMMENT
FROM ICARE_ICC_ACTIVITY_EXT;
Code: Select all
CURSOR A IS
nothing;
Thank you Ben.
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Does TextPad 5.3 regex match text over multiple lines?
Does TextPad 5.3 fix this regex problem with matching text over multiple lines? I am still using 4.7.3 and will upgrade if it does. If not, is there a plan to modernize "TextPad's aged regular expression engine" anytime soon?ben_josephs wrote:Yes, this has been discussed many times before.
TextPad's aged regular expression engine is incapable of matching text containing an arbitrary number of newlines.
If your input is not too long, you could change the newlines to something else, do your stuff, then change them back.
Or you could record a macro that extends the selection from the beginning of the wanted text to its end, and do your stuff on the selected text.
Alternatively, you could try WildEdit (http://www.textpad.com/products/wildedit/), which uses a far more powerful regular expression engine.
Re: Does TextPad 5.3 regex match text over multiple lines?
No, it doesn't.JohnH wrote:Does TextPad 5.3 fix this regex problem with matching text over multiple lines?
Your guess is as good as anyone's.JohnH wrote:If not, is there a plan to modernize "TextPad's aged regular expression engine" anytime soon?
Andrew