Vim Tips Wiki
Advertisement

You demonstrate the use of the regex using this regex:

/\/[A-z]/

Did you perhaps mean

/\/[A-Z]/

or

/\/[A-Za-z]/

?

If you were actually making use of the characters that occur between 'Z' and 'a' in ASCII that is an unusual usage and is probably not really appropriate for an explanation of what the regex does.

While you have chosen an example that is practical for developers, it might make better sense if you used something a little easier to read to understand the concept you are trying to communicate...

This is Chapter 3 Chapter 2 And what about Chapter 7 Chapter 1

could be sorted using

sort /Chapter /

and it would be clear what the example was doing without having a moderately complex regex making it hard to understand what is actually a pretty simple idea

Advertisement