| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | [TSEPro] Re: regular expressions |
From: Michael Fisher
@Date: Fri, 07 Mar 2003 09:10:48 -0800
@Sender: semware-owner{at}sawasdi.apana.org.au
>From "Greg Macdonald"
>Date Thu, 6 Mar 2003 17:18:17 -0800
>Define "in one line".
>With more complex searches, it occurs to me that the goal is
>really more logical content centric than line centric and
>the condition should be "in one sentence or paragraph".
In source code or data files, "in one line" usually means
"contained within one pair of line-delimiting control codes",
such as , , or combinations thereof.
The line is an important structural and logical unit unit in
such context. Sentences and paragraphs would more apply to
textual information in natural languages.
These two cconcepts require somewhat different approaches
when you want to do complex searches.
>On the other hand, even a paper clip is inadequate if
>you have too many pieces of paper.
? Can't follow this one.
I'd rather say, there comes the point when even TSE and grep
searches have to be replaced by something more specialized
like awk.
>From "Charles Irish"
>Date Thu, 6 Mar 2003 22:13:36 -0500
>Also if one doesn't like that, there is cludgy which would
>be assign the strings to an array of strings and count the
>hits by array occurence and if the count = the number of
>strings in the array being tested, then you have a match on
>all the strings 1..n and you can return in this case the
>line in question
Yep, you could write a macro function for such searches,
though it would have to be a rather complex one, to deal with
all the eventualities of string searches.
If I understand you correctly, you want to search for the
strings in question using an array, index the lines of the
file by number of hits, and the lines that have as many hits
as there are search strings must contain them all?
--
TSEPro Mailing List
List Maintenance: www.semware.com/html/list.htm
---
[sawasdi.apana.org.au] (3:800/846.13)
* Origin: apana>>>>>fidonetSEEN-BY: 633/267 270 @PATH: 800/846 1 640/954 774/605 123/500 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.