Formatting
Work on a String
New Scripts
1
Sort a list of absolute paths according to their depths.
2011.03.01
Basic
1
Insert `HERE' just before the 12th character.
2000.10.17
2
Insert a minus sign ('-') between every two consecutive characters. For example, format `abcde' to `a-b-c-d-e'.
2000.10.23
Part of a string
1
Format part of a string, from left to right.
2007.01.06
2
Format part of a string, from right to left.
2007.01.06
3
Move the leading blanks of the field starting from column 12 till 20 to the end of it.
2007.02.24
4
Insert a comma after every character except the first three and the last one.
2007.02.28
Parentheses Related
1
Given a formula, insert a newline character after each right-parenthesis where all left-parentheses to the left of it are balanced.
2005.05.30
2
Escape every outermost opening/closing parenthesis.
2008.07.07
3
Remove all parentheses but keep the ones of maximum depth.
2008.07.18
4
Modify all members of some brace-enclosed structures.
2009.08.31
5
Extract data of depth
N
.
2010.11.30
Padding numbers with leading zeros
1
Padding numbers less than 5 digits with leading zeros to make them 5-digit.
2011.01.27
2
Padding numbers not belonging to double-quoted strings with leading zeros to make them 5-digit.
2011.01.28
Misc
1
Add commas to every integer of a line. For example, format 1234567 to 1,234,567.
2000.10.16
2
Format numbers of the form like '4045551212', to '(404) 555-1212'.
2002.01.30
3
Compose a command line from a file name.
2004.10.04
4
Remove consecutive repeated characters of a string.
2005.07.08
5
Reverse a line.
2006.06.23
6
Capitalize words of a line.
2008.01.30
7
Reverse every word of a line.
2008.02.13
8
Transform file paths to canonical ones.
2008.09.05
9
Sort a list of absolute paths according to their depths.
2011.03.01