From ef377284cade2f8308c0d4a790e65b9d4184a2c1 Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 19 Jan 2011 16:03:56 +0000 Subject: [PATCH] --- PROMS/DataLoader/TextConvert.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/PROMS/DataLoader/TextConvert.cs b/PROMS/DataLoader/TextConvert.cs index 51d985c5..88bcd041 100644 --- a/PROMS/DataLoader/TextConvert.cs +++ b/PROMS/DataLoader/TextConvert.cs @@ -215,9 +215,17 @@ namespace DataLoader public static string ConvertDOSSuperAndSubScripts(string instr) { - string retval = Regex.Replace(instr, "[#](.*?)[#]", "\\up2 $1\\up0 ");// DOS Superscript - retval = Regex.Replace(retval, "[~](.*?)[~]", "\\dn2 $1\\up0 ");// DOS Subscript - return retval; + try + { + string retval = Regex.Replace(instr, "[#](.*?)[#]", "\\up2 $1\\up0 ");// DOS Superscript + retval = Regex.Replace(retval, "[~](.*?)[~]", "\\dn2 $1\\up0 ");// DOS Subscript + return retval; + } + catch (Exception ex) + { + Console.WriteLine("Error in ConvertDOSSuperAndSubScripts"); + } + return ""; } private static string FixFortranNumber(Match match) {