Sometimes referred to as square brackets, a bracket is a punctuation mark typically found in pairs. There are two types of brackets: the open bracket ( [ ) and the closed bracket ( ] ). The open bracket has an open end towards the right, and the closed bracket has an open end towards the left. Brackets are the two keys found to the right of the P key on a US QWERTY keyboard.
Where are the square bracket keys on the keyboard?
Below is an overview of a computer keyboard with the open square bracket and close bracket keys highlighted in blue.
How to create an open and close square bracket
Creating the '[' and ']' symbols on a U.S. keyboard
Note: If you are pressing and holding the Shift key while pressing the square bracket key you will get a curly bracket.
Creating the '[' and ']' symbol on a smartphone or tablet
How are brackets used?
- Basic textual manner to add additional or missing details ("It was an honor to do it [the presentation].")
- Used in standard mathematical notation for intervals and floor functions, as well as in the Lie bracket and Iverson bracket.
Regular expression bracket example
$value = s/[a-z]/-/ig;
var myList = new Array();
myList = "value1";
myList = "value2";
myList = "value3";
SQL programming bracket example
WHERE name LIKE '[M-Z]inger'