Smart Group criteria for finding Computer Names with an apostrophe...

MacMaul
New Contributor II

I would like to single out Macs named like "Whoever's iMac" but can't seem to create criteria that catches Computer Names with an apostrophe in them. Computer Name matching regex ['] or using Computer Name is like ' only returns one machine for whatever odd reason.

1 ACCEPTED SOLUTION

ryan_ball
Valued Contributor

@PhilMaul Take a look at the Computer Name section of a computer in question. It uses a different type of apostrophe, which is probably why it is not working for you.

# This is what you were looking for: '

# This is what that field usually uses: ’

# So the criteria would be Computer Name Matches regex
.*["’].*

View solution in original post

5 REPLIES 5

ryan_ball
Valued Contributor

Try this:

# Criteria is Computer Name Matches Regex:
.*["'].*

MacMaul
New Contributor II

@ryan.ball No difference, just the same single machine was found.

ryan_ball
Valued Contributor

@PhilMaul Take a look at the Computer Name section of a computer in question. It uses a different type of apostrophe, which is probably why it is not working for you.

# This is what you were looking for: '

# This is what that field usually uses: ’

# So the criteria would be Computer Name Matches regex
.*["’].*

MacMaul
New Contributor II

@ryan.ball Yep, that worked! Thank you.

johankjellman
New Contributor II

Used this solution for finding computers that have names ending with (