Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sampleText = "A/R Patient TIKASI, DEREK 00000000 00000000 Inpatient "
- $maxLength = 1500
- $firstDigitPosition = [regex]::match($sampleText,"\d").Index
- $padChar = " "
- $padding = $padChar * ($maxLength - $sampleText.Length)
- $finalRow = $sampleText.Substring(0,$firstDigitPosition - 1) + `
- $padding + `
- $sampleText.Substring($firstDigitPosition - 1,$sampleText.Length - $firstDigitPosition + 1)
- $finalRow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement