04: FINDing your Way Around

This is a temporary forum setup for the purpose of discussing the EMC standards
Locked
wGEric
Registered User
Posts: 521
Joined: Wed Jun 11, 2003 2:07 am
Contact:

Re: 04: FINDing your Way Around

Post by wGEric »

The second one does work. You can have a FIND be multiple lines and then do IN-LINE actions on those. IN-LINE actions can only be one line though (the IN-LINE FIND).
Eric
User avatar
Nux
Registered User
Posts: 943
Joined: Tue Jun 14, 2005 5:09 pm
Location: 3cities, Poland
Contact:

Re: 04: FINDing your Way Around

Post by Nux »

Hm... So the one below wouldn't/shouldn't work :?:

Assuming that we work on the following file:

Code: Select all

This is the first line.
This is the second line.
This is the third line.
This is the fouth line.

Code: Select all

#-----[ OPEN ]------
input

#-----[ FIND ]------
This
This

#-----[ IN-LINE FIND ]------
# Note&#58 Trying to find in the second line...
second

#-----[ IN-LINE REPLACE WITH ]------
blah
The output file is:

Code: Select all

This is the first line.
This is the blah line.
This is the third line.
This is the fouth line.
I'm just not sure if the lines found in the first FIND are (or should be) treated as one line or as separate ones?

I belive it would be easier to treat them as one. Other wise, how to treat two (or more) IN-LINEs - should the next in-line be applied to the next (second) line or to the same (first) line, what if only one line was found... :?:
wGEric
Registered User
Posts: 521
Joined: Wed Jun 11, 2003 2:07 am
Contact:

Re: 04: FINDing your Way Around

Post by wGEric »

That will work. FINDs can be multiple lines. IN-LINE actions can't. So you can do a FIND with multiple lines and then do an IN-LINE FIND to perform IN-LINE actions on a certain line within the multi lined FIND.
Eric
Locked