# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/\s(\w*)Command\.Register\((([\S]*,([^;\n\r])*)+)typeof\((.*)Values\)\);/GridObjectModel.Register$1Reference$2($3, $4TypeIdString);/g;t' <<< "public static readonly SimpleCommand ReadTemperatureCommand =
SimpleCommand.Register(ReadTemperatureCommandId, \"ReadTemperature\", \"showtemp.py\", \"\", 5, typeof(TemperatureListCommandResultProcessor), typeof(TemperatureListDeviceValues));
public static readonly SimpleCommand GetDataType1Command =
SimpleCommand.Register(
GetDataType1CommandTypeId,
\"GetData\",
\"HttpClient2.py\",
@\"\"\"/data/ajax.txt?CAN=1&HASH=00200403&TYPE=1\"\" \"\"GET\"\" \"\"\"\"\",
5,
typeof(SunwaysSolarInverterDataType1CommandResultProcessor),
typeof(SunwaysSolarInverterDeviceValues));
public static readonly ArgumentedCommand UpdateAsyncCommandsCommand =
ArgumentedCommand.Register(
UpdateAsyncCommandsCommandId,
\"UpdateAsyncCommands\",
\"UpdateAsyncCommands.py\",
\"\",
5,
UpdateAsyncCommandsCreateArguments,
new[] { typeof(AsynchronousCommand[]) },
typeof(UpdateAsyncCommandsCommandResultProcessor),
typeof(GridboxCommunicationObjectValues));
public static readonly SimpleDynamicObjectAttribute<bool> AsynchronousCommandsChangedProperty =
SimpleDynamicObjectAttribute<bool>.Register(\"AsynchronousCommandsChanged\", false, typeof(BusyGridObjectValues), false, false);
public static readonly SimpleDynamicObjectAttribute<string> MailProperty =
SimpleDynamicObjectAttribute<string>.Register(\"Mail\", typeof(DefaultUserValues));
public static readonly ProtectedSimpleDynamicObjectAttribute<int> PasswordStorageMethodVersionProperty =
ProtectedSimpleDynamicObjectAttribute<int>.Register(\"PasswordStorageMethodVersion\", 2, typeof(DefaultUserValues));
public static readonly ListSetDynamicObjectAttribute<string> LocalIpNetworksProperty =
ListSetDynamicObjectAttribute<string>.Register(\"LocalIpNetworks\", typeof(GridboxCommunicationObjectValues));
public static readonly DictionaryDynamicObjectAttribute<Guid, GridObjectTypeContentFilter> ContentFiltersProperty =
DictionaryDynamicObjectAttribute<Guid, GridObjectTypeContentFilter>.Register(\"ContentFilters\", typeof(DefaultContentFilterValues));
public static readonly StrongGridObjectReference ContentFilterListContentFilterIdProperty =
StrongGridObjectReference.Register(\"ContentFilterListContentFilterId\", new Guid(\"ce06d088-1b5e-4cab-98d2-b0fd63bc0d5b\"), typeof(ContentFilterValues));
public static readonly GridObjectReference ContentFilterListContentFilterIdProperty =
GridObjectReference.Register(\"ContentFilterListContentFilterId\", new Guid(\"ce06d088-1b5e-4cab-98d2-b0fd63bc0d5b\"), typeof(ContentFilterValues));
public static readonly GridObjectReference ContentFilterListContentFilterIdProperty =
GridObjectReference.Register(\"ContentFilterListContentFilterId\", new Guid(\"ce06d088-1b5e-4cab-98d2-b0fd63bc0d5b\"), typeof(ContentFilterValues));
public static readonly GridObjectReferenceList PermissionIdsProperty =
GridObjectReferenceList.Register(\"PermissionIds\", typeof(DefaultRoleValues));"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html