Easy Way to Substitute Invalid Filename Characters?

Is there a concise expression to substitute invalid characters, without having to use lots of nested SUBSTITUTE functions?

Lots of characters cause problems when creating file names, such as : \ ? < > ’ / * etc

I want to substitute all these and more with - (dash) without having to do lots of nested substitutes?

Any ideas?

0 5 181
5 REPLIES 5

I don’t think so.

Steve
Platinum 4
Platinum 4

If you’re using Google Sheets, you could use REGEXREPLACE(). I dunno if Excel has that function.

Hello boys, 

So How you explain we can use REGEXREPLACE with Appsheet, but I try to write REGEXREPLACE([data X];" ";"U+005F")), and it says that it's not valid.

Any idea??

 

Thanks

AppSheet doesn't have Regular Expression capabilities, @Steve was talking about using the expression in the backend data source, either Google Sheets (where it is built in) or Excel (where I think it is included in an add in).

ok, @graham_howe thanks, now it's clarify. 

So, the only way it's Substitute. 

Top Labels in this Space