This post is more than 5 years old

9 Posts

902

February 17th, 2012 06:00

Truncating Host Names

Hi.

I'm creating a custom report to match a list of Virtual Hosts to a list of Clients from NetWorker. Unfortunately, most (but not all) of the VM hosts have Fully Qualified Domain Names (FQDNs), whereas Networker just has a simple Client name. This means I cannot get the right merge to work. I therefore need to truncate the 'Virtual Host' field to only keep that which is before the first full stop. I believe the filter   ([^\.]*).*   will do this, but I'm struggling to use the right operators to achieve the string operation. There doesn't seem to be a standard operator to either substring or truncate text fields, so can anyone provide any clues on how I can truncate a text field in this manner?

Many thanks in advance.

59 Posts

February 18th, 2012 09:00

Hi Ken,  you need to use that filter (which is a regular expression) in the "Search and Replace" operator eg.

in the properties of the 'Search and Replace" operator, set "Replace String" with $1 and "Search String" with the regex.

No Events found!

Top