If I have this:
2.2.3.140113
and do this:
$([System.Text.RegularExpressions.Regex]::Replace( $(str), '^(\d+)\.(.+)$', '$1_$2' ) )">
I will get this:
2_2.3.140113
What I want is that it should be
2_2.3
How do I remove the last part?
Change your regex to:
^(\d+)\.(.+)\.\d+$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With