🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
1 messages
1 total messages Started by Jonathan I. Kamens Mon, 02 Sep 1991 06:52
Re: Regular Expressions
#541
Author: Jonathan I. Kamens
Date: Mon, 02 Sep 1991 06:52
35 lines
2434 bytes
In article <20214@darkstar.ucsc.edu>, david@cats.ucsc.edu (David Wright) writes:
|> I think I am now able to do this. However, I cannot use . or * or seeminlgy
|> any combination of them to search for any character.

You don't need to, at least not for the example you gave.

|> For example, suppose the article's subject line is
|> 
|> Subject: V3ixx1a: programable robits in morse code (part 01/3221)
|> 
|> how can I represent a string of any character for any length so I can
|> just go / (part 3221\/3221) /h  

This is just fine.  The only problem with it is the space after the closing
parenthesis.  The parenthesis is the last character on the subject line.  If
you try the pattern you've given above, it won't work, because there's no
space at the end of the line for your pattern's ending space to match against.

You don't need to use .*, which is the sequence that matches against any
sequence of zero or more characters, in this case, because your regular
expressions don't need to match the entire line, they just need to patch part
of it.

Note that the space at the beginning of your expression is OK, because there
*is* a space in the subject line before the opening parenthesis.

I have directed followups to news.software.readers.  Although perhaps I should
have chosen comp.unix.questions, since this has turned into a discussion of
regular expressions.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads