User:Salvatos1/sandbox/cargo

Force Shield dismantles, list of Card
''Note: Calls to Decoy and Drone Avatar (and hypothetically others) don't account for duplicates. E.g. Force Shield uses Decoy-2. Those would need to be manually edited every time the table is updated since the IF SQL function is disabled and we can't perform replacements at query time.''

Cargo TSV regexr export strings
1. Export the 'raw' sheets from https://docs.google.com/spreadsheets/d/1ApYyEZhtU6DYvFj78BqJM5GyIR7b4Rx_55TaW-3i568/edit#gid=0 to .tsv format and copy-paste into regexr.com. 2. Perform the replacements below for each type of data.

Convoy: (flags /gm) ^([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)$

Leader: (flags /gm) ^([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)$

Equipment: First, we perform a series of replacements on column 'Dismantle Cards' specifically to make it a Cargo-compatible list (use flags /gm on all).

1. Extract card names from array \{\d+,"(?:([^\}]+)|)",\d+,"(?:([^\}]+)|)",\d+\} $1;$2;

2. Remove duplicate names (?:;|^)(.+?)(?=;+(?:.+;+)?\1(?:;|$)) (nil)

3. Fix extra separations from empty fields and end/start of line ^;+|((?=;))|;$ (nil)

Put the result in the appropriate column, then perform a global replacement on the whole table (flags /gm): ^([^\t]*)\t([^\t]*)\t([^\t]*)\t(?:[^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t(?:[^\t]*)\t([^\t]*)\t([^\t]*)\t(?:\{"([^"]*)"\}|)\t(?:\{"([^"]*)",\d",\d,?\d{0,2}\}|)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t(?:[^\t]*)$

Remember to manually edit duplicate card names as instructed in the Cargo template.