home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
rbemx144.zip
/
ruby-1.4.4
/
sample
/
regx.rb
< prev
next >
Wrap
Text File
|
1998-01-16
|
320b
|
24 lines
st = "\033[7m"
en = "\033[m"
#st = "<<"
#en = ">>"
while TRUE
print "str> "
STDOUT.flush
input = gets
break if not input
if input != ""
str = input
str.chop!
end
print "pat> "
STDOUT.flush
re = gets
break if not re
re.chop!
str.gsub! re, "#{st}\\{en}"
print str, "\n"
end
print "\n"