#!/usr/bin/perl #Nisus Macro Block #source front #destination new #Send Text as RTF #End Nisus Macro Block
@myfile=<STDIN>;
foreach $s (@myfile){
$s=~s/([A-Z][a-z]?[0-9]*)([0-9][+-])/$1\{\\super $2\}/g;
$s=~s/([A-Z][a-z]?)([0-9]*[+-])/$1\{\\super $2\}/g;
$s=~s/\)([+-])/\)\{\\super $1\}/g;
$s=~s/\)([0-9]+)([0-9][+-])/\)\{\\sub $1\}{\\super $2\}/g;
$s=~s/([A-Z][a-z]?)([0-9]+)/$1\{\\sub $2\}/g;
$s=~s/\)([0-9]+)/\)\{\\sub $1\}/g;
$s=~s/\]([0-9]+)/\]\{\\sub $1\}/g;
$s=~s/(\sX\s10|\sx\s10)([+-]?[0-9]*)/$1\{\\super $2\}/g;
print $s;
}# end of script
--
Patrick Gormley
Lapeer East High School
Lapeer MI 48446
http://chem.lapeer.org
-Knowledge is proud it knows so much; wisdom is humble it knows no more. --William Cowper
---------------------------------------------------
The Nisus Interactive List
[EMAIL PROTECTED]
Searchable archives: http://www.mail-archive.com/nisus-interactive%40nisus.com/
To unsubscribe from this list please send a message with "unsubscribe nisus-interactive your first name your last name" in the body of the email to [EMAIL PROTECTED]
