Is 'replace()' case sensitive, and if so how to avoid it?

Hi, I have this:
image
And still get this:


The values are coming from an OpenAi prompt so they’re a bit unpredictable. Is it not recognising 'Unavailable" as ‘unavailable’? If so how do I avoid?

Hey @Jon_Bowles

Can you please share the blueprint of your scenario.

2 Likes

blueprint.json (38.9 KB)

@Jon_Bowles

You have to write “Unavailable” with capital “U” not with small “u”.

2 Likes

What about if the response (as it usually is) is lowercase u? I just wondered if the ‘replace’ was case-sensitive. I’ve remedied it in the prompt anyway, but thanks.

Use “startcase” function inside the “replace” function.

2 Likes

Thankyou, I actually wanted it all lower case, but you put me on the right path, I used ‘lower()’ instead. :slight_smile:

1 Like