s/(\w+)'/!\1/g
In reply to Re^3: Generate a truth table from input string by psini in thread Generate a truth table from input string by Anonymous Monk