<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RegExp for extracting host names from switch alias in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/RegExp-for-extracting-host-names-from-switch-alias/m-p/146359#M26622</link>
    <description>&lt;P&gt;If it is always 4 characters, dash, ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;([A-Za-z0-9]{4})([A-Za-z0-9]+)-.*&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This regular expression will:&lt;/P&gt;
&lt;P&gt;Look for exactly 4 alphanumeric case insensitive characters - this will be \1 aka string 1&lt;/P&gt;
&lt;P&gt;Look for at least a 2 alphanumeric case insensitive string that follows - this will be \2 aka string 2&lt;/P&gt;
&lt;P&gt;Look for a dash, follow by more characters&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When this pattern matches, you will have 2 strings&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you change the format for this rule from "\1" to "\1-\2" , you will build a concatenated string of "string1-string2"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would characterize this regexp as fairly risky - it is only worth trying if ALL of your hosts are named this way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this pattern only applies for TSM hosts, you will want to write a narrower regexp&lt;/P&gt;</description>
    <pubDate>Fri, 01 Feb 2019 18:16:25 GMT</pubDate>
    <dc:creator>ostiguy</dc:creator>
    <dc:date>2019-02-01T18:16:25Z</dc:date>
    <item>
      <title>RegExp for extracting host names from switch alias</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/RegExp-for-extracting-host-names-from-switch-alias/m-p/146350#M26618</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a&amp;nbsp; problem with RegExp for extracting host names from&amp;nbsp; switch alias.&lt;/P&gt;
&lt;P&gt;Details:&lt;/P&gt;
&lt;P&gt;switchalias : abcdtsm01_aixfcs3&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hostname :&amp;nbsp; abcd-tsm01&lt;/P&gt;
&lt;P&gt;Expression used: ([a-zA-Z0-9]*)_([^_]+).*&amp;nbsp;&amp;nbsp;&amp;nbsp; \1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; it will capture&amp;nbsp;&amp;nbsp; "&amp;nbsp;abcdtsm01" which is wrong&lt;/P&gt;
&lt;P&gt;How can i add&amp;nbsp; "-" in the middle&amp;nbsp; to show as&amp;nbsp;&amp;nbsp; abcd-tsm01.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 12:53:52 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/RegExp-for-extracting-host-names-from-switch-alias/m-p/146350#M26618</guid>
      <dc:creator>ameegama</dc:creator>
      <dc:date>2025-06-04T12:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: RegExp for extracting host names from switch alias</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/RegExp-for-extracting-host-names-from-switch-alias/m-p/146356#M26619</link>
      <description>&lt;P&gt;Are all the strings the same, meaning four letters and then - or are they different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;regex is to pull out what you need, but string manipulation is different&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 17:41:44 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/RegExp-for-extracting-host-names-from-switch-alias/m-p/146356#M26619</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2019-02-01T17:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: RegExp for extracting host names from switch alias</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/RegExp-for-extracting-host-names-from-switch-alias/m-p/146357#M26620</link>
      <description>&lt;P&gt;Are all the hosts exactly 4letters-xxxxx?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, you have an alphanumeric string - how do you know where the dash is supposed to be?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 17:49:06 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/RegExp-for-extracting-host-names-from-switch-alias/m-p/146357#M26620</guid>
      <dc:creator>ostiguy</dc:creator>
      <dc:date>2019-02-01T17:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: RegExp for extracting host names from switch alias</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/RegExp-for-extracting-host-names-from-switch-alias/m-p/146358#M26621</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Few Hostnames&amp;nbsp; same four letters and then&amp;nbsp; "-" .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 17:57:23 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/RegExp-for-extracting-host-names-from-switch-alias/m-p/146358#M26621</guid>
      <dc:creator>ameegama</dc:creator>
      <dc:date>2019-02-01T17:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: RegExp for extracting host names from switch alias</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/RegExp-for-extracting-host-names-from-switch-alias/m-p/146359#M26622</link>
      <description>&lt;P&gt;If it is always 4 characters, dash, ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;([A-Za-z0-9]{4})([A-Za-z0-9]+)-.*&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This regular expression will:&lt;/P&gt;
&lt;P&gt;Look for exactly 4 alphanumeric case insensitive characters - this will be \1 aka string 1&lt;/P&gt;
&lt;P&gt;Look for at least a 2 alphanumeric case insensitive string that follows - this will be \2 aka string 2&lt;/P&gt;
&lt;P&gt;Look for a dash, follow by more characters&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When this pattern matches, you will have 2 strings&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you change the format for this rule from "\1" to "\1-\2" , you will build a concatenated string of "string1-string2"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would characterize this regexp as fairly risky - it is only worth trying if ALL of your hosts are named this way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this pattern only applies for TSM hosts, you will want to write a narrower regexp&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 18:16:25 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/RegExp-for-extracting-host-names-from-switch-alias/m-p/146359#M26622</guid>
      <dc:creator>ostiguy</dc:creator>
      <dc:date>2019-02-01T18:16:25Z</dc:date>
    </item>
  </channel>
</rss>

