Sorting Strings when the Embedded Number has a Variable Number of Digits

Here is a short post on something that can catch people out at times when sorting strings. If you have a list of strings that contain numbers like - {"item2", "item4", "item1", "item3", "item11", "item12"} , and you perform a simple order by on them, you will get - {"item1", "item11", "item12", "item2", "item3", "item4"} Not what you want. To resolve this, you need to isolate the number, convert…