Metacharacter
Encyclopedia
A metacharacter is a character that has a special meaning (instead of a literal
Literal
Literal may refer to:*Literal and figurative language, taken in a non-figurative sense*Literal translation, the close adherence to the forms of a source language text...

 meaning) to a computer program, such as a shell interpreter or a regular expression
Regular expression
In computing, a regular expression provides a concise and flexible means for "matching" strings of text, such as particular characters, words, or patterns of characters. Abbreviations for "regular expression" include "regex" and "regexp"...

 engine.

Examples

  • In some Unix shell
    Unix shell
    A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems...

    s and Windows PowerShell
    Windows PowerShell
    Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework...

    , the ; (semicolon) character is a statement separator.
  • In many regular expression engines, the . (dot) character matches any character, not just a dot.
  • In XML
    XML
    Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

     and HTML
    HTML
    HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

    , the & (ampersand) character introduces an HTML entity
    Character encodings in HTML
    HTML has been in use since 1991, but HTML 4.0 was the first standardized version where international characters were given reasonably complete treatment...

    .
  • In many programming language
    Programming language
    A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

    s, string
    String (computer science)
    In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set or alphabet....

    s are delimited
    Delimiter
    A delimiter is a sequence of one or more characters used to specify the boundary between separate, independent regions in plain text or other data streams. An example of a delimiter is the comma character, which acts as a field delimiter in a sequence of comma-separated values.Delimiters represent...

     using quote
    Quote
    Quotation is the repetition of someone else's statement/thoughts. This can be in the form of words, songs, American Sign Language, written, or any other form of communication. Quotation marks are punctuation marks used in text to indicate the words of another speaker or writer...

    s. In some cases, escape character
    Escape character
    In computing and telecommunication, an escape character is a character which invokes an alternative interpretation on subsequent characters in a character sequence. An escape character is a particular case of metacharacters...

    s (and other methods) are used to avoid delimiter collision. Example : "He said : \"Hello\"".
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK