Subject: | |
From: | |
Reply To: | |
Date: | Thu, 23 Jan 2003 14:06:32 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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 *
|
|
|