09-09-2020 07:00 AM - edited 09-09-2020 07:12 AM
Hi guys,
I have an array of input string for example "P?\.?" I need to split it into an array as
index 0=P
index 1=?
index 2=\.
index 3=?
(I.e if its a "?" I have to store it in a different index and if its "\." I have to store in a different index.
Please help me with this?
also attached and vi which I'm working on.
Solved! Go to Solution.
09-09-2020 07:32 AM - edited 09-09-2020 07:33 AM
Was about to say that this is insanely easy, then noticed the dot after the backslash. Give us a couple other example strings and expected outputs.
What if the input string is "P?/.?" (forward slash)? What if it's "P?.\.?" (extra dot)?
I'm working in 2017 so I can't open your VI unfortunately.
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
09-09-2020 07:38 AM - edited 09-09-2020 07:41 AM
Thanks for the reply.
there won't be any forward slashes.
below are few examples of the string
P?\.?
REL?\.?\.?
P??\.?
(i.e "\." are always together and with the same order and same type.)
09-09-2020 07:48 AM
@tars364 wrote:
Thanks for the reply.
there won't be any forward slashes.
below are few examples of the string
P?\.?
REL?\.?\.?
P??\.?
(i.e "\." are always together and with the same order and same type.)
What are the expected outputs of those examples?
I'm gonna guess:
"REL?\.?\.?" --> [R, E, L, ?, \., ?, \., ?]
"P??\.?" --> [P, ?, ?, \., ?]
That right?
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
09-09-2020 07:52 AM - edited 09-09-2020 07:56 AM
Yes it is right.
but I want keep the starting string combined in the first index.
i.e (REL?\.?\.?) =>>> OUTPUT ==>>(REL, ?,\.,?,\.,?)
09-09-2020 08:05 AM
Yes, could you help with this?
09-09-2020 08:11 AM
Lot of different ways to do this but this is the first that came to mind.
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
09-09-2020 08:18 AM
Thank you