fork(1) download
  1. s = "H||CUSTCHQH2H||PHPCCIPHP|1010032000|28092017|25001853||||"
  2. p s.gsub(/\A(H.*?\|)[0-9]{8}(?=\|)/, '\100000000')
  3. # or
  4. p s.gsub(/\AH.*?\|\K[0-9]{8}(?=\|)/, '00000000')
Success #stdin #stdout 0s 6424KB
stdin
Standard input is empty
stdout
"H||CUSTCHQH2H||PHPCCIPHP|1010032000|00000000|25001853||||"
"H||CUSTCHQH2H||PHPCCIPHP|1010032000|00000000|25001853||||"