Customizable Natural-Order Sort
Editor's Note: This file was selected as MATLAB Central Pick of the Week
- a +/- sign
- a decimal point and decimal fraction
- E-notation exponent
- decimal, octal, hexadecimal or binary notation
- Inf or NaN values
- criteria supported by regular expressions: lookarounds, quantifiers, etc.
- ascending/descending sort direction
- character case sensitivity/insensitivity
- relative order of numbers vs. characters
- relative order of numbers vs NaNs
Cite As
Stephen23 (2022). Customizable Natural-Order Sort (https://www.mathworks.com/matlabcentral/fileexchange/34464-customizable-natural-order-sort), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: asort: a pedestrian alphanumeric string sorter, sort_nat: Natural Order Sort, Number to Scientific Prefix, Number to Words, Natural-Order Row Sort, Natural-Order Filename Sort, Words to Number, Scientific Prefix to Number, Next Available Filename
Inspired: Words to Number, Scientific Prefix to Number, Numeric to Yllion, Number to Scientific Prefix, Numeric to Ordinal-String, Number to Words, Natural-Order Row Sort, Natural-Order Filename Sort, Interactive Regular Expression Tool
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.