Skip to content

Instantly share code, notes, and snippets.

Created December 6, 2018 17:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cms/5ecd5b867a15bd1391ffc815c90e6a1e to your computer and use it in GitHub Desktop.
using System.Linq;
using System.Text.RegularExpressions;
using ServiceStack;
using ServiceStack.Text;
var mysisRef = "360T364827992x";
var _360tRef = Get360TReference(mysisRef);
public string Get360TReference(string mysisRef)
var regex = new Regex(@"^360T(\d+)[a-zA-Z]?");
var match = regex.Match(mysisRef);
if (match.Success)
return match.Groups[1].Value;
return null;
<?xml version="1.0" encoding="utf-8"?>
<package id="ServiceStack.Text" version="5.2.0" targetFramework="net45" />
<package id="ServiceStack.Client" version="5.2.0" targetFramework="net45" />
<package id="ServiceStack.Interfaces" version="5.2.0" targetFramework="net45" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment