Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Throw a message box when a special character is found...

$
0
0

Again,, thought this would be pretty easy just looking to throw a message box if a special character is found.. 

Using this starter code, it works if only one special character is used, but with multiple characters, does not throw message box. 

Example ------- > : <---------Works

Example -------> :::: <---------Does not work

if(":/~/^\*$/".ToCharArray() -Contains $Sub)

[System.Windows.Forms.MessageBox]::Show("Special Characters are not supported", "Informational")
return
}


Djoe


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>