We’re having trouble with customers giving us an address missing a space between the street number and name. Address validation can be very complicated, I am not trying to validate an entire address, just fix this one issue before passing it to an address validation API.
The first line of an address should look like this:
123 Main St.
We’re getting addresses from customers where the first space is missing:
123Main St.
A valid address could look like these and shouldn’t get a space injected:
123A Main St.
123-A Main St.
I think a regex would work to detect this, and I could use the split block to break the address apart, add a space, and put it back together.
I asked ChatGPT and got a lot of solutions that didn’t work