I have made some progress. I googled C# scripting examples and then just started experimenting. Here are a few I did that work.
=(ILength==null)?(""):(((IName.Contains("ISO")|(IName.Contains("DIN"))?(ILength + " mm"):(ILength))))
The "Contains" is what I use instead of wildcard asterik. For example, you can't say IName="*ISO*". You have to use the Contains method. This was incredibly useful for us. Our company always uses metric and imperial. However the External BoM formats units for the entire bom. This makes it tricky for us. Our ISO/DIN Bolts length always show up in inches. So I wrote the above script to check for DIN or ISO and then add mm to the length. THE "|" is C# version of "OR"
Something else I learned, if you use some measurement token (e.g. IWidth or ILength) , in a script, it will always return the value in mm. It doesn't matter how the Unit Properties of your BoM are setup. To get around this I had to use Template Mapping to create a custom External BoM Tokens that format the value as I need. See SS below.

This mostly worked. I ran into a problm if the Custom Token was nested in an IF statement. If the custom token is used in an IF statement that is nested in another IF statement the BoM returns null or a "True", "False" value. It's weird and I cant explain it. If it's in the top level IF statement the custom token works. AS is weird. Below is that script
=IName.Contains("Bent") | IClass.Contains("Nut") | IClass.Contains("Washer")?(IName.Contains("Bent")?"TBD":""):XXXLengthUS
The easiest script I wrote I used to to get around AS's bug regarding mapping for folded beams. It was confirmed by AutoDesk that mapping for folded beams does not work as intended. AS will correctly map the folded beam. The problem is, for reasons unknown, IExternal1 does NOT replace IName as it does for all other mapping items. So below I did a check if IExternal1 is blank, then use IName, otherwise External1. Works perfectly
=IExternal1 = ""?IName:IExternal1