Need to extract computer names from a text file
i have text file has computer names need extract from, text file has ton of other non-essential data in don't care use.
all computer names follow naming convention there 5 6 characters hyphen , either 2 or 3 numerical characters.
so, naming standard this:
abcw7-01 or abcw7d-100
anyway, how may go extracting these using regex?
thanks
okay, think found it.
it appears able extract info needed using following regex pattern:
'\w+-\d+'
Windows Server > Windows PowerShell
Comments
Post a Comment