A special character is a character that is not an alphabetic or numeric character. Punctuation marks and other symbols are examples of special characters. Unlike alphanumeric characters, special characters may have multiple uses.
Special characters and symbols have importance in many programming languages like the execution of the database query, commenting, syntax writing, writing codes, executions of code blocks, mathematical logic implementation in codes, and many more.
Character | Pronounce | Where it used |
~ | Tilde | Shorten long file names.In regular expressions used for pattern matching.a tilde and a dollar sign is a temporary file.home directory on a Linux computer.the ~ represents a bitwise NOT. |
` | Grave accent | the backtick can be used for command substitution. the back quote is sometimes used to emphasize code contained in the comment. |
! | Exclamation point | In programming and scripting languages, the exclamation mark is used as “not.” A shebang to help scripts, such as Perl scripts, to identify the location of Perl. Used to help identify a nonexecutable statement. |
@ | Ampersat | E-mail address.Array in computer programming.A short way of saying “at” in chat or a text message.In a batch file to not echo to the screen.Placing the @ symbol in front of a username on Twitter directs the tweet to that user. |
# | Octothorpe | In hashtags. In programming to identify a nonexecutable statement. In IRC chat an identifier of a channel. |
$ | Dollar sign | In computer programming languages, the dollar sign has a wide variety of uses. In languages like BASIC, Pascal, and PHP, the dollar sign defines variables and constants. ALGOL 68 and TeX typesetting languages use the dollar sign for delimiting transput format and mathematical regions. ASP.NET uses the dollar sign to indicate an expression. |
% | Percent sign | Using a % as a wildcard in a database. Represent matched text. In programming languages like Perl, a % is used for a hash. In Python, the % is an operator that returns the remainder of a number. In Microsoft Windows, a percent is used for an environment variable. |
^ | Circumflex, caret | Carets can be used in computer programming languages for various reasons. Many programs that support regular expressions (regex) use ^ to match the first character in a line or string. |
& | Ampersand | Used in programming languages, including Visual Basic (to combine variables and literal text), C++ (denoting an address in memory) and Perl (to call a user-defined subroutine). It can also be used in Excel spreadsheet formulas to combine several values (cells) into a single value (cell) and in HTML for extended HTML characters. |
* | Asterisk | An asterisk in a math formula. In the PHP code, the comment “hidden text” would not show when executed because it is surrounded by a forward slash and an asterisk.The asterisk represents a wildcard or wild character with computers. |
( | Open parenthesis | In many computer programming languages, parentheses have a special purpose.In regular expressions, parentheses are used for pattern grouping and capturing. |
) | Close parenthesis | In many computer programming languages, parentheses have a special purpose.In regular expressions, parentheses are used for pattern grouping and capturing. |
_ | Underscore | The underscore is commonly used as an alternative to the space key when a space is not allowed.It is not uncommon to use an underscore in a file name in place of a space, especially on the Internet. |
– | Hyphen, dash | The hyphen is commonly used in programming and mathematics to subtract one number from another.A minus symbol or a horizontal line is a symbol used as an indication for a decrease, remove, move up, or zoom out on software programs and hardware devices. |
+ | Plus sign | The plus key is most often used in programming and mathematics to add two or more numbers or as a programming operator.Two pluses next to each other in programming is a shorthand method of incrementing a variables value. |
= | Equal sign | In programming languages, the equal symbol is also an operator in a conditional statement. With computers, the equals sign is commonly used in programming and mathematics to show a total value or assign a value.In Microsoft Excel and other spreadsheet programs, all formulas begin with the equal sign. |
{ | Open brace | These keys are most commonly used in curly bracket programming languages such as C, Java, Perl, and PHP to enclose groups of statements or for a block of code. |
} | Close brace | These keys are most commonly used in curly bracket programming languages such as C, Java, Perl, and PHP to enclose groups of statements or for a block of code. |
[ | Open bracket | Regular expressions, wildcards, SQL, Visual Basic, C#, and JavaScript programming languages to enclose characters for string validation, pattern matching, or build arrays.In JavaScript programming bracket. In SQL programming bracket. |
] | Close bracket | Regular expressions, wildcards, SQL, Visual Basic, C#, and JavaScript programming languages to enclose characters for string validation, pattern matching, or build arrays.In JavaScript programming bracket. In SQL programming bracket. |
| | Vertical bar | In programming, the double pipe “||” is used to represent an OR boolean operator. |
\ | Backslash | The backslash is used as an escape character. A file and directory separator in a file path. A networked computer or folder in a network path. |
: | Colon | A colon in front or end of a word (depending on programming language) creates a label that can be used with a goto.In a URL, a colon separates the protocol with the address.In MS-DOS and the Windows command line, a colon indicates a drive letter.In a spreadsheet formula, a colon specifies a range. |
; | Semicolon | The semicolon is used in many computer programming to finish an instruction.A semicolon may also be used as a delimiter to separate text.Other programming languages like AutoHotkey use a semicolon for non executable statements. |
“ | Double quotation mark | In computer programming, quotes contain text or other data.If surrounded by a single quote instead of a double quote, the string is treated as a literal string in many languages.In a command line to recognize files or directories with spaces, they must be surrounded by quotes.Quotes are an integral part of the HTML language. Consequently, to write a quote that is not part of an HTML tag, you need to use the " special character.Quotes are also an important part of what makes other scripting and programming languages. To print the quotation mark symbols as output, you need to escape the quote. |
‘ | Single quotation mark, apostrophe | In most computer programming, single quotes are commonly used to contain commands or literal strings.In other programming languages, like QBasic and Visual Basic, the single quote is treated as a nonexecutable statement.In Microsoft Excel, an apostrophe causes Excel to treat the text entered into a cell after the apostrophe as text instead of a number. |
< | Open angle bracket, less than symbol | Less than could be used in computer programming.The less than symbol resembles an arrow pointing to the left and is commonly used in math and computer programming.Symbol is used to create HTML tags, it cannot be used in text without causing errors. To create a less than in HTML use either the entity number < or entity name < in your code.When working with negative numbers, the negative number farthest away from zero is less than the other negative number. |
> | Close angle bracket, greater than symbol | Greater than symbol could be used in computer programming. With a markup language, like HTML, the greater than symbol is used to close a tag.Greater than symbol is used to end HTML tags, it cannot be used in text without causing errors. To create a greater than symbol in HTML, use either the encoded entity number > or entity name > in your code. |
, | Comma | The comma is used in programming as an operator to separate values or elements.When dealing with numbers, in a calculator, or programs like Microsoft Excel, a comma style is setting that group’s numbers.When writing out the date with the month, date, and year the comma is used to separate the date from the year. |
. | Period | It is used as or part of a wildcard in programming code.Two periods can be used with the cd command in the Windows command line and Linux to move back one directory.The period is used to help create a URL and break up important portions of the URL. |
? | Question mark | The question mark can be used as a wildcard character, a substitute for any one character.MS-DOS commands the question mark can be used as a part of a switch to display the help for any command.Some programming languages, such as C#, POSIX, Perl, Python, BASIC, and Ruby utilize the question mark for various functions. |
/ | Forward slash | Forward slash is in the nonexecutable statement used with some programming languages. HTML, XML, and other markup languages, the forward slash is used with closing tags to let the browser or reader know when a tag ends. |
Happy Exploring Special Characters 🙂
Discover more from mycodetips
Subscribe to get the latest posts sent to your email.