Programmatically enable/disable device connection

Anybody got a good approach for parsing out a DeviceName from a tag's OPCItemPath? Looks like it is delimited with square-brackets ... I'll try something based on that definition.

nm: Split Regex expression to get tag OPCItemPath 'Device' name - Ignition - Inductive Automation Forum