Using # in input strings without commenting out code

I need to send katalon a string to search for in my examples that includes the # character the cucumber code I have looks like

Then I should see in row 1

Examples:
| Variable1 |
| Example #1 |

The problem I run into is that everything after # is getting commented out and ignored by Katalon. I tried adding a \ before the # but it simply adds in another \ to treat the first \ as part of the string I want to search for instead of functioning as an escape character for the #

1 Like

HI @adam.noodelman, Try this:

def exampleOne = 'Example \\#1 This is a test.'
exampleOne = exampleOne.replace('\\', '')
println('exampleOne: ' + exampleOne)

Result: exampleOne: Example #1 This is a test.