Utilities

Browser Sizer

ASCII Character Chart
0NUL 16DLE 32SP 480 64@ 80P 96` 112p
1SOH 17DC1 33! 491 65A 81Q 97a 113q
2STX 18DC2 34" 502 66B 82R 98b 114r
3ETX 19DC3 35# 513 67C 83S 99c 115s
4EOT 20DC4 36$ 524 68D 84T 100d 116t
5ENQ 21NAK 37% 535 69E 85U 101e 117u
6ACK 22SYN 38& 546 70F 86V 102f 118v
7BEL 23ETB 39' 557 71G 87W 103g 119w
8BS 24CAN 40( 568 72H 88X 104h 120x
9HT 25EM 41) 579 73I 89Y 105i 121y
10LF 26SUB 42* 58: 74J 90Z 106j 122z
11VT 27ESC 43+ 59; 75K 91[ 107k 123{
12FF 28FS 44, 60< 76L 92\ 108l 124|
13CR 29GS 45- 61= 77M 93] 109m 125}
14SO 30RS 46. 62> 78N 94^ 110n 126~
15SI 31US 47/ 63? 79O 95_ 111o 127DEL
ASCII Translate
Regular Expressions

Single Character - The following rules govern one-character RegExp that match a single character:

  • Special characters are: + * ? . [ ] ^ $ ( ) { } | \ &
  • Any character that is not a special character matches itself.
  • Use the keyboard (Tab, Enter) to match whitespace characters.
  • The asterisk (*) matches the specified characters throughout the entire document.
  • The carat (^) matches the beginning of the document.
  • The dollar sign ($) matches the end of the document.
  • A backslash (\) followed by any special character matches the literal character itself; that is, the backslash escapes the special character.
  • The pound sign (#) and hyphen (-) characters must be escaped in expressions (## --) just as though they were special characters.
  • A period (.) matches any character, including a new line. To match any character except a new line, use [^#chr(13)##chr(10)#], which excludes the ASCII carriage return and line feed codes.
  • A set of characters enclosed in brackets ([]) is a one-character RegExp that matches any of the characters in that set. For example, [akm] matches an a, k, or m. Note that if you want to include a closing square bracket (]) in square brackets, it must be the first character. Otherwise, it does not work, even if you use \].
  • Any regular expression can be followed by one of the following suffixes:
    • {m,n} forces a match of m through n (inclusive) occurrences of the preceding regular expression.
    • {m,} forces a match of at least m occurrences of the preceding regular expression.
    • The syntax {,n} is not allowed.
  • A range of characters can be indicated with a dash. For example, [a-z] matches any lowercase letter. However, if the first character of the set is the caret (^), the RegExp matches any character except those in the set. It does not match the empty string. For example, [^akm] matches any character except a, k, or m. The caret loses its special meaning if it is not the first character of the set. All regular expressions can be made case-insensitive by substituting individual characters with character sets, for example, [Nn][Ii][Cc][Kk].

Character Classes - You can specify a character by using a POSIX character class:

  • [[:alpha:]] - Any letter, [A-Za-z]
  • [[:upper:]] - Any uppercase letter, [A-Z]
  • [[:lower:]] - Any lowercase letter, [a-z]
  • [[:digit:]] - Any digit, [0-9]
  • [[:alnum:]] - Any alphanumeric character, [A-Za-z0-9]
  • [[:xdigit:]] - Any hexadecimal digit, [0-9A-Fa-f]
  • [[:space:]] - A tab, new line, vertical tab, form feed, carriage return, or space
  • [[:print:]] - Any printable character
  • [[:punct:]] - Any punctuation character: ! ' # S % & ' ( ) * + , - . / : ; < = > ? @ [ / ] ^ _ { | } ~
  • [[:graph:]] - Any character defined as a printable character except those defined as part of the space character class
  • [[:cntrl:]] - Any character not part of the character classes: [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], [:print:], [:punct:], [:graph:]

Multi Character - The following rules govern multi-character regular expressions:

  • Parentheses group parts of regular expressions together into grouped subexpressions that can be treated as a single unit. For example, (ha)+ matches one or more instances of "ha".
  • A one-character regular expression or grouped subexpressions followed by an asterisk (*) matches zero or more occurrences of the regular expression. For example, [a-z]* matches zero or more lowercase characters.
  • A one-character regular expression or grouped subexpressions followed by a plus (+) matches one or more occurrences of the regular expression. For example, [a-z]+ matches one or more lowercase characters.
  • A one-character regular expression or grouped subexpressions followed by a question mark (?) matches zero or one occurrences of the regular expression. For example, xy?z matches either "xyz" or "xz".
  • The concatenation of regular expressions creates a regular expression that matches the corresponding concatenation of strings. For example, [A-Z][a-z]* matches any word, regardless of case.
  • The OR character (|) allows a choice between two regular expressions. For example, jell(y|ies) matches either "jelly" or "jellies".
  • Braces ({}) are used to indicate a range of occurrences of a regular expression, in the form {m, n} where m is a positive integer equal to or greater than zero indicating the start of the range and n is equal to or greater than m, indicating the end of the range. For example, (ba){0,3} matches up to three pairs of the expression "ba".

Back Reference - Allows you to match text in previously matched sets of parentheses:

You can use a backslash followed by a digit n (\n) to refer to the nth parenthesized subexpression. One example of how you can use back references is searching for doubled words, for example, to find instances of "is is" or "the the" in text. The following example shows the syntax you use for back referencing in regular expressions:

("There is is coffee in the the kitchen", "([A-Za-z]+)[ ]+\1", "*", "ALL")

This code searches for words that are all letters ([A-Za-z]+) followed by one or more spaces [ ]+ followed by the first matched subexpression in parentheses. The parser detects the two occurrences of is as well as the two occurrences of the and replaces them with an asterisk, resulting in the following text:

There * coffee in * kitchen

Anchoring - You can anchor all or part of a regular expression to either the beginning or end of the string being searched:

  • If a caret (^) is at the beginning of a subexpression, the matched string must be at the beginning of the string being searched.
  • If a dollar sign ($) is at the end of a subexpression, the matched string must be at the end of the string being searched.