Linux [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux [Electronic resources] - نسخه متنی

Janet Valade

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


Match One of Alternate Literal Strings ( ( | ) )


You can put a set of literal strings, each separated by a pipe bar (|), between parentheses. The string matches if it contains any one of the alternate literal strings.

Regular Expression

Match

Not a Match

a(bc|de|fg)x

abcx, adex, afgx

ax, abx, abcdex

I (love|hate) carrots

I love carrots

I like carrots

Many special characters and literal characters can be mixed together to form a regular expression. Really long, complex regular expressions can be built to match any conceivable string.

A special character is sometimes part of a literal string. If you want to include special characters in a regular expression to be treated as literal characters, you insert a backslash ( \ ) in front of the special character. For example, look at the following two regular expressions:

^.$
^\.$

The first pattern matches a line that has one character on it, any character. The second expression matches a line that has one dot on it. The \ in front of the dot makes it into a literal dot, rather than a special character that represents any one character. Using a \ in front of a special character is called escaping the character.

If you need to use a \ as a literal character, you would include \\ in the regular expression.


    / 357