Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def replaceFirstDigitRegExp(input)
- x = 0
- string = ""
- change = false
- while (x < input.length)
- if input[x] >= '0' and input[x] <= '9' and change == false then
- string[x] = "#"
- change = true
- else
- string[x] = input[x]
- end
- x = x + 1
- end
- return string
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement