Skip to content

Instantly share code, notes, and snippets.

@robert-werner
Created May 22, 2019 08:10
Show Gist options
  • Select an option

  • Save robert-werner/e131e019af757f0b3520ff0782db3014 to your computer and use it in GitHub Desktop.

Select an option

Save robert-werner/e131e019af757f0b3520ff0782db3014 to your computer and use it in GitHub Desktop.
Labs and FSM vars to Honeti keys
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Text.RegularExpressions;
namespace ConsoleApp1
{
class Program
{
private static List<string> LabList;
static void Main(string[] args)
{
StreamWriter sw = new StreamWriter(@"C:\tools\next2.txt");
LabList = LabListMethod(@"C:\tools\exto.txt");
foreach(var lab in LabList)
{
sw.WriteLine(lab);
}
}
static List<string> LabListMethod(string path)
{
string line;
StreamReader stream = new StreamReader(path);
List<string> str = new List<string>();
while ((line = stream.ReadLine()) != null)
{
line = line.ToLower();
line = "^" + line;
line = Regex.Replace(line, @"\t", "-");
str.Add(line);
}
return str;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment