Seth Morton
                                            Seth Morton
                                        
                                    Or, are the class-based code snippets just examples of behavior and not actual examples of how to implement? If so, it would not require a re-write, but would likely be...
> > I would still like to hear an explanation or demonstration of what more flexible means. > > Well, the main reason is very simple: matching the behaviour of...
Would not `r'(\D|\W)'` work, which is "anything not numeric and anything not alphabetic?" Or, if you need to include `_` then `r'(\D|\W|_)'`. That should cut down the characters from 136110...
Let's start over. It sounds to me like there is a set of requirements you have that were not present in the original problem statement: > Currently natsort doesn't sort...
> `\W` matches `[^A-Za-z0-9_]` This is only true if the `ASCII` flag is used, which is not being used in this case. [From the Python docs](https://docs.python.org/3/library/re.html): > `\W` > >...