Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

find/replace command

1 view
Skip to first unread message

aiia...@gmail.com

unread,
Jan 2, 2007, 6:47:21 PM1/2/07
to
would be cool to have a BASIC program that would load
in a TXT file, search for text, and replace it.. I know merlin
already does this with the REPLACE command, but it
won't allow you to specify wildcards or any other specifics
for text to find..

I'm trying to figure out how to make it look to the user:

FIND:
(*1),(" "),(",")(*1)(*1)

* = wildcard, 1 = number in list of specs for the wildcard


specs:
(*1) = (>= 0 AND <=9) OR (>=a AND <=f)

*1 would find hex digits only


any other ideas?

Rich

Anton Treuenfels

unread,
Jan 2, 2007, 8:23:41 PM1/2/07
to

<aiia...@gmail.com> wrote in message
news:1167781640.9...@n51g2000cwc.googlegroups.com...

Stick with a notation lots of people know already, like regular expressions.

You could start with a simple version described by Kernighan & Pike in the
April 1999 issue of Dr Dobb's journal. It's not a full regular expression
matcher, but it's very compact code and does handle the 'match any
character' and 'match previous zero or more times' meta-characters.

- Anton Treuenfels


Michael J. Mahon

unread,
Jan 2, 2007, 8:25:24 PM1/2/07
to

How about a cpp for the //e (or any other tidy macrogenerator)?
Or grep?

-michael

NadaNet networking for Apple II computers!
Home page: http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."

0 new messages