Escaping comma seperated values?

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Bluscre
Posts: 145
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: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.

mattd_nf
Posts: 16
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: 145
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: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.

User avatar
Desmanto
Posts: 2709
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), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply