Create smart labels by parsing computer name. Use regex?
As many of you probably do, we create our computer names using a combination of location, employee role, and computer number. I want to create smart labels that just looks at the middle part of the name. Our computer name is like this: ABCD1234YZ. Where 1234 is the part I want the smart label to look at. There’s always the same number of characters in each of the sections. 4 characters in ABCD. 4 characters in 1234. 2 characters in YZ.
The ABCD section has 15 different variations and more that will get created soon. Needless to say, it would be pointless and tedious to add a line to the smart label to account for each of those 15 variations. I’m wondering if there’s a way for the smart label to basically ignore the ABCD section of the computer name and only look at the 1234 part. I’m imagining something like this.
- First smart label: Computer Names that match “####1234##”
- Second smart label: Computer Names that match “####5678##”
- Third smart label: Computer Names that match “####9012##”
My assumption is that this might be possible using some regex hocus-pocus. I’m just not familiar enough with regex. Any ideas?
Answers (0)
Be the first to answer this question
or with a regex
Ssystem name match regex ^.{4}1234.{2} - flip1001 5 years ago
You can use System Name Contains 1234 - flip1001 5 years ago