java replaceAll()

java, string

Solution

Assuming s is a `String`.

s.replaceAll("N/A", "0");

You don't even need regular expressions for that. This will suffice:

s.replace("N/A", "0");

Problem

What is the regular expression for `replaceAll()` function to replace "N/A" with "0" ? input : `N/A` output : `0`

Original source