Suppose we have a string as under
"http://www.dotnetfunda.com/articles/show/3158/import-xml-file-and-transform-into-relational-model-for-dynamic-column" we want to split and then print the string array elements.
Code $string = "http://www.dotnetfunda.com/articles/show/3158/import-xml-file-and-transform-into-relational-model-for-dynamic-column"
$separator = "/"
$option = [System.StringSplitOptions]::RemoveEmptyEntries
$string.Split($separator,$option)
We are using the
Split function for the operation
Result http:
www.dotnetfunda.com
articles
show
3158
import-xml-file-and-transform-into-relational-model-for-dynamic-column