$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
13 Mar // php the_time('Y') ?>
Just a very quick post (more like a note to self) but I wanted to split a string with the $ sign in PowerShell:
1 | 'one$two$three$four$five' -split '$' |
Took me a little while to realize that this doesn’t work as the split operator in Windows PowerShell uses a regular expression in the delimiter, rather than a simple character.
The easy fix is to Escape the $ sign with a backslash:
1 | 'one$two$three$four$five' -split '\$' |
Or alternatively use the SimpleMatch option:
1 | 'one$two$three$four$five' -split '$', 0, "SimpleMatch" |
The 0 represents the “return all” value of the Max-substrings parameter. You can use options, such as SimpleMatch, only when the Max-substrings value is specified.
Leave a reply