I apologize for the specific problem that I am posting here, but hope this helps others who may also encounter this problem. I have a string that is formatted as follows:
[[,action1,,],[action2],[]]
I would like to translate this into a valid YAML so that it can be parsed so that it looks like this:
[['','acton1','',''],['action2'],['']]
I tried a bunch of regular expressions for this, but I'm afraid that I have a complete loss. I am fine with running multiple expressions if necessary. For example (ruby):
puts s.gsub!(/,/,"','")
puts s.gsub!(/\[',/, "['',") # => [['','action1','',']','[action2]','[]]
What happens there, but I have a feeling that I am starting to descend from the rat moon with this approach. Is there a better way to do this?
Thanks for the help!