How can I bulk update and standardize variant sizes in my clothing store?

My clothing store has a lot of products where I entered the variant sizes differently. For example, I have 0-3M, 0-3m, 0-3, etc., but these should really all just be 0-3M. Is there a way to bulk update the values for the variant sizes so that they are all consistent?

Bonus question: Is there a way to restrict the available variant values to a predefined list when entering new products to prevent inconsistencies in the future?

Use the CSV product export, edit the options then import the fixed CSV.

Or use the shopify admin bulk editor

https://help.shopify.com/en/manual/products/import-export/using-csv

https://help.shopify.com/en/manual/shopify-admin/productivity-tools/bulk-editing

Bonus answer: The shopify admin has no native features allowing it to be modified to enforce form contstraints. Effectively you need to build your own admin: Either control the data entry in another place such as an Excel/google-sheet spreadsheet, build a custom data entry app, or use an automation app such as usemechanic to script automation to disambiguate normalize option values after they are entered with some logic and probably a lot of regex. At this time afaik shopify-flow has no actions to edit variant options without advanced http action workarounds.