<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Parsing DCI instance discovery name]]></title><description><![CDATA[<p dir="auto">Hello</p>
<p dir="auto">When creating DCi with instance discovery how can i parse the name to remove text between "[" and "]" inlcuding brackets also?</p>
<p dir="auto">Example name: Camera - Name a - b - c [4a613e60-77f3-4e32-8d8e-d4723d945b98]</p>
<p dir="auto">Egert</p>
]]></description><link>https://forum.netxms.org/topic/6892/parsing-dci-instance-discovery-name</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 17:39:14 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6892.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 03 Feb 2021 09:42:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Parsing DCI instance discovery name on Thu, 04 Feb 2021 11:11:31 GMT]]></title><description><![CDATA[<p dir="auto">Many thanks, had to adjust script litle bit, but got it working.</p>
<pre><code>m = $1 match "(.+)\[.+\]";

if (m) {

  return %(true, $2, m[1]);

}
else
{
  return false;
}
</code></pre>
]]></description><link>https://forum.netxms.org/post/29407</link><guid isPermaLink="true">https://forum.netxms.org/post/29407</guid><dc:creator><![CDATA[Egert143]]></dc:creator><pubDate>Thu, 04 Feb 2021 11:11:31 GMT</pubDate></item><item><title><![CDATA[Reply to Parsing DCI instance discovery name on Thu, 04 Feb 2021 10:27:29 GMT]]></title><description><![CDATA[<p dir="auto">You can modify instance name and display name in instance discovery filter script by supplying them in array that script returns. Just open "Hint" in filter script editor, it has the necessary information. Here's an example script:</p>
<pre><code>m = $1 match "(.+)\[.+\]";
if (m) {
  return( %(true, m[1]) );
}
else
{
  return false;
}
</code></pre>
<p dir="auto">First line matches instance against a regex. The regex has one capture group which returns anything that is prior to [.<br />
If regex got matched we can get this capture group as first element of array m.</p>
]]></description><link>https://forum.netxms.org/post/29405</link><guid isPermaLink="true">https://forum.netxms.org/post/29405</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Thu, 04 Feb 2021 10:27:29 GMT</pubDate></item></channel></rss>