Zero Padding Numbers, Episode 2

You can turn on case insentive with: (?i)
You can turn off case insentive with: (?-i)

You can place these at different intervals of your reg exp or just have one at the start of your reg exp such as '(?i)' to not worry what case the text string is.

Padding zeros _FILENAME: EDIT: Read the OPs Problem wrong.

Action type: Format value
Field: _FILENAME
Formatstring: $regexp($regexp($regexp(%_filename%,'^(\d{6}.+)\s+([0-9]+)$','$1 000$2'),'(?i)^(\d{6}.+\s+listening\s+)\d+(\d{2})$','$1$2'),'(?i)^(\d{6}.+\s+class\s+)\d+(\d{3})$','$1$2')

Results:

123456 English Class 7

654321 English Listening 23
123456 English Class 00000000000006
123456 English class 07
654321 English listening 23
123456 English class 00000000000006

123456 English Class 007
654321 English Listening 23
123456 English Class 006
123456 English class 007
654321 English listening 23
123456 English class 006

If you want to change the padding at any stage just change the (\d{2}) or (\d{3}) where you see fit.