HP3000-L Archives

January 2003, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Keven Miller <[log in to unmask]>
Reply To:
Keven Miller <[log in to unmask]>
Date:
Thu, 23 Jan 2003 14:06:32 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (38 lines)
In sed and VI the '*' character doesn't match anything, but means 0 or more
occurances of the previous pattern or character.
[Not sure of its meaning in Qedit -- shame on me, big qedit fan]

You could try these in sed/VI however:
        /##.*##/

which will match the largest string on a line. It would
match this complete line:       "## sample1 ## ... ## sample#2 ##"


        /##[^#]*##/

would match what you want provided you didn't have a single
'#' in the text part. It would match "## sample1 ##" from
the above sample but not the second pattern.


        /##([^#]*(#[^#])?)*##/
This should match each pattern from the above sample.
It says,
        match "##",
        Then match 0 or more groups of
                any number of chars not "#",
                then 0 or 1 group of "#" followed by anychar not "#"
        and complete by matching "##"

I believe in VI and sed, the single character match wildcard of '.'
does not natch a newline. So the pattern .* will not span lines.



___________________________________________________________________
Keven Miller   mailto:[log in to unmask]   http://www.exegesys.com

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2