using System.Text.RegularExpressions;
public static void Main()
var location = @"TRVYP14220217A5235.7885N00724.1840E000.0130919177.561000050660000200004,262,01,14635,52789,FritzBox7|DC-39-8F-7E-94-73|-89&FritzBox7|24-4E-5D-71-C3-9C|-90&MY_IOT|80-B4-F7-77-9C-7C|-81&MYAP|44-D4-F7-77-9C-7C|-80#";
var regex = new Regex(@"(TRVYP14)(\d{6})([AV])(\d{4}.\d{4})N(\d{5}\.\d{4})E(\d{3}.\d)(\d{6})(\d{3}\.\d\d)(\d{3})(\d{3})(\d{3})([012])(0[012])(0[012])([012])([012])([012])(\d)([0-4]),(\d+),(\d+),(\d+),(\d+),(.*)#");
var match = regex.Match(location);
Date = match.Groups[2].Value,
Valid = match.Groups[3].Value,
Lon = match.Groups[4].Value,
Lat = match.Groups[5].Value,
Speed = match.Groups[6].Value,
Time = match.Groups[7].Value,
DirectionAngle = match.Groups[8].Value,
GsmSignal = match.Groups[9].Value,
NumberOfSatelites = match.Groups[10].Value,
BatteryPower = match.Groups[11].Value,
ACCStatus = match.Groups[12].Value,
DefenseStatus = match.Groups[13].Value,
WorkingStatus = match.Groups[14].Value,
OilSwitch = match.Groups[15].Value,
ElectricSwitch = match.Groups[16].Value,
AssemblyState = match.Groups[17].Value,
AlarmFlags = match.Groups[18].Value,
VoiceControlRecording = match.Groups[19].Value,
MCCCountryCode = match.Groups[20].Value,
MNC = match.Groups[21].Value,
LAC = match.Groups[22].Value,
CID = match.Groups[23].Value,
Wifi = match.Groups[24].Value,
Console.WriteLine(parsed);