Remove space after comma

I feel that this should be a relatively easy thing to do, but I am stumped. I have a date formatted as e.g. “29 Apr, 2024”. I need to remove the space after “,” to make it “29 Apr,2024”. How do I do this? TIA!

we can use the string replace method:

Assign Activity:
strCleansed =
YourStringVar.Replace(", ",",")

Or can use a regex

I tried this but the space is still there. Regex confuses me :frowning:

My workaround was to split the string, then concatenate (with trim).

have a look here:

done with:

not recommended, as we can handle more simple as shown above

1 Like

Thank you so much for your help. I’m not sure why the replace function isn’t given me the same result. I however, found another solution using the Modify Date activity and providing my own custom format. This way I didn’t need to manipulate the string at all.

Thanks again. I have bookmarked the regex cheatsheet!

perfect so the topic can be closed by marking the solving post

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.