A few regular expressions to parse WIFI schemes such as:
WIFI:T:WEP;S:test;P:rainbows\;unicorns\:jedis\,ninjas\\ secure;;
###Raw (?<=T:)[a-zA-Z]+(?=;) ###expanded (?<=T:) #Match the prefix T: but exclude from capture [a-zA-Z]+ #Any alpha character, 1 or more repetitions (?=;) #Match the suffix ; but exclude from capture
###Characters that are not allowed
? " $ \ [ ] +
###Characters that must be escaped
\ ; , :
###Raw (?<=S:)((?:[^\;\?\"\$\[\\\]\+])|(?:\[\;,:]))+(?<!\;)(?=;)
###Java (?<=S:)((?:[^\\;\\?\\\"\\$\\[\\\\\\]\\+])|(?:\\[\\;,:]))+(?<!\\;)(?=;)
###expanded (?<=S:) #Match the prefix S: but exclude from capture ( #Choose from the following 2 choices (?:[^\;\?\"\$\[\\\]\+]) #Anything that isn't one of the restricted characters | #OR (?:\[\;,:]) #An escaped special character )+ #1 or more repititions (?<!\;)(?=;) #Match a ; only if there isn't a ; before it
###Raw (?<=P:)((?:\[\;,:])|(?:[^;]))+(?<!\;)(?=;)
###Java (?<=P:)((?:\\[\\;,:])|(?:[^;]))+(?<!\\;)(?=;)
###expanded (?<=P:) #Match the prefix S: but exclude from capture ( #Choose from the following 2 choices (?:\[\;,:]) #An escaped special character | #OR (?:[^;]) #Any character that isn't a ; )+ #1 or more repititions (?<!\;)(?=;) #Match a ; only if there isn't a ; before it