A few regular expressions to parse WIFI schemes such as:
WIFI:T:WEP;S:test;P:rainbows\;unicorns\:jedis\,ninjas\\ secure;;
(?<=T:)[a-zA-Z]+(?=;)
(?<=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
? " $ \ [ ] +
\ ; , :
(?<=S:)((?:[^\;\?\"\$\[\\\]\+])|(?:\\[\\;,:]))+(?<!\\;)(?=;)
(?<=S:)((?:[^\\;\\?\\\"\\$\\[\\\\\\]\\+])|(?:\\\\[\\\\;,:]))+(?<!\\\\;)(?=;)
(?<=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
(?<=P:)((?:\\[\\;,:])|(?:[^;]))+(?<!\\;)(?=;)
(?<=P:)((?:\\\\[\\\\;,:])|(?:[^;]))+(?<!\\\\;)(?=;)
(?<=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