Escaping comma seperated values?

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Bluscre
Posts: 134
Joined: 31 Aug 2017 13:58
Location: Germany
Contact:

Escaping comma seperated values?

Post by Bluscre » 14 Aug 2019 01:46

The docs for Input Lists state "A comma seperated list of values..." but does not say how one would escape a comma in such a value. I tried \, but the backslash was just printed on the screen.
Unofficial AutoMagic Telegram Group: http://t.me/automagic4android
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Sent from my Lenovo TAB 2 A10-70L running Android 6.0.

mattd_nf
Posts: 12
Joined: 21 Dec 2016 15:51

Re: Escaping comma seperated values?

Post by mattd_nf » 14 Aug 2019 12:41

Put quotes around it like:

one,two,"three,",four

User avatar
Bluscre
Posts: 134
Joined: 31 Aug 2017 13:58
Location: Germany
Contact:

Re: Escaping comma seperated values?

Post by Bluscre » 14 Aug 2019 21:25

Thanks, would be nice if this was stated in the docs ^^
Unofficial AutoMagic Telegram Group: http://t.me/automagic4android
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Sent from my Lenovo TAB 2 A10-70L running Android 6.0.

User avatar
Desmanto
Posts: 2177
Joined: 21 Jul 2017 17:50

Re: Escaping comma seperated values?

Post by Desmanto » 17 Aug 2019 16:40

I usually just put the element into a list first, the use listformat comma. The element inside will always be escaped properly.

Code: Select all

a = newList("hello", ",world", "good");
b = "{a,listformat,comma}";
just use {a,listformat,comma} in the input dialog list or any input field that require comma delimited element.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

Post Reply