utils.re_utils

Module Contents

utils.re_utils.nat_sort_key(str)[source]

The key to sort a list of strings alphanumerically (e.g. “file10” is correctly placed after “file2”)

Parameters:str – the string to sort alphanumerically in a list of strings
Returns:the key to sort strings alphanumerically
utils.re_utils.escape_special_chars(text)[source]

Escape ^,%, ,[,],(,),{,} from text

Parameters:text – the command to escape special characters inside
Returns:the command with escaped special characters