Try this calculation:
Let ( sizelist = Substitute (yourfield; "," ; "¶") ;
filteredlist = FilterValues ( "X-Small (Out of Stock)¶ Small (Out of Stock)¶ Medium (Out of Stock)¶ Large (Out of Stock)¶ X-Large (Out of Stock)" ; sizelist ) ;
Substitute (filteredlist ; "¶" ; ",") )
This expression changes the commas into carriage returns to change it into a list so that filtervalues can filter out only the desired terms. Then it converts the carriage returns back into commas.
a field that contains the following data:
X-Small (Out of Stock), Small, Medium (Out of Stock), Large, X-Large
I suggest you rethink your strategy: instead of pushing all this information into a single field, split it up into individual records in a related table - and use separate fields for size and availability.