List of Regular Expressions

अक्षर

परिणाम / इस्तेमाल

कोई भी अक्षर

Represents the given character unless otherwise specified.

.

Represents any single character except for a line break or paragraph break. For example, the search term "sh.rt" returns both "shirt" and "short".

^

Only finds the search term if the term is at the beginning of a paragraph. Special objects such as empty fields or character-anchored frames, at the beginning of a paragraph are ignored. Example: "^Peter".

$

Only finds the search term if the term appears at the end of a paragraph. Special objects such as empty fields or character-anchored frames at the end of a paragraph are ignored. Example: "Peter$".

$ on its own matches the end of a paragraph. This way it is possible to search and replace paragraph breaks.

*

"*" के सामने शून्य या अधिक अक्षर ढूंढता है. उदाहरण के लिए, "Ab*c" ढूंढता है "Ac", "Abc", "Abbc", "Abbbc", और इसी तरह.

+

"+" के सामने एक या अधिक अक्षरों को ढूंढता है. उदाहरण के लिए, "AX.+4" ढूंढता है "AXx4", परंतु "AX4" नहीं.

The longest possible string that matches this search pattern in a paragraph is always found. If the paragraph contains the string "AX 4 AX4", the entire passage is highlighted.

?

"?" के सामने शून्य या कोई एक अक्षर ढूंढता है. उदाहरण के लिए, "Texts?" ढूंढता है "Text" तथा "Texts" तथा "x(ab|c)?y" ढूंढता है "xy", "xaby", या "xcy".

\

Search interprets the special character that follows the "\" as a normal character and not as a regular expression (except for the combinations \n, \t, \>, and \<). For example, "tree\." finds "tree.", not "treed" or "trees".

\n

Represents a line break that was inserted with the Shift+Enter key combination. To change a line break into a paragraph break, enter \n in the Find and Replace boxes, and then perform a search and replace.

\n in the Find text box stands for a line break that was inserted with the Shift+Enter key combination.

\n in the Replace text box stands for a paragraph break that can be entered with the Enter or Return key.

\t

Represents a tab. You can also use this expression in the Replace box.

\b

Match a word boundary. For example, "\bbook" finds "bookmark" but not "checkbook" whereas "book\b" finds "checkbook" but not "bookmark". The discrete word "book" is found by both search terms.

^$

रिक्त अनुच्छेद को ढूंढता है.

^.

अनुच्छेद के प्रथम अक्षर को ढूंढता है.

& or $0

Adds the string that was found by the search criteria in the Find box to the term in the Replace box when you make a replacement.

For example, if you enter "window" in the Find box and "&frame" in the Replace box, the word "window" is replaced with "windowframe".

You can also enter an "&" in the Replace box to modify the Attributes or the Format of the string found by the search criteria.

[abc123]

किसी एक अक्षर का प्रतिनिधित्व करता है कोष्ठकों के बीच है.

[a-e]

Represents any of the characters that are between a and e, including both start and end characters

The characters are ordered by their code numbers.

[a-eh-x]

किसी भी अक्षर का प्रतिनिधित्व करता है जो a-e तथा h-x के बीच नहीं है.

[^a-s]

किसी भी अक्षर का प्रतिनिधित्व करता है जो a तथा s के बीच नहीं है.

\uXXXX

\UXXXXXXXX

Represents a character based on its four-digit hexadecimal Unicode code (XXXX).

For obscure characters there is a separate variant with capital U and eight hexadecimal digits (XXXXXXXX).

For certain symbol fonts the code for special characters may depend on the used font. You can view the codes by choosing Insert - Special Character.

|

Finds the terms that occur before the "|" and also finds the terms that occur after the "|". For example, "this|that" finds "this" and "that".

{2}

निर्धारित करता है कि ओपनिंग कोष्ठक के सामने कितनी मर्तबा अक्षर आएगा. उदाहरण के लिए, "tre{2}" ढूंढता है "tree".

{1,2}

निर्धारित करता है कि ओपनिंग कोष्ठक के सामने कितनी न्यूनतम मर्तबा अक्षर आ सकता है. उदाहरण के लिए, "tre{2,}" ढूंढता है "tree", "treee", तथा "treeeee".

{1,}

निर्धारित करता है कि ओपनिंग कोष्ठक के सामने कितनी न्यूनतम मर्तबा अक्षर आ सकता है. उदाहरण के लिए, "tre{2,}" ढूंढता है "tree", "treee", तथा "treeeee".

( )

In the Find box:

Defines the characters inside the parentheses as a reference. You can then refer to the first reference in the current expression with "\1", to the second reference with "\2", and so on.

For example, if your text contains the number 13487889 and you search using the regular expression (8)7\1\1, "8788" is found.

आप शब्दों को समूहीकृत करने के लिए () का इस्तेमाल भी कर सकते हैं, उदाहरण के लिए, "a(bc)?d" ढूंढता है "ad" या "abcd".

In the Replace box:

Use $ (dollar) instead of \ (backslash) to replace references. Use $0 to replace the whole found string.

[:alpha:]

Represents an alphabetic character. Use [:alpha:]+ to find one or more of them.

[:digit:]

Represents a decimal digit. Use [:digit:]+ to find one or more of them.

[:alnum:]

अल्फ़ान्यूमेरिक अक्षर का प्रतिनिधित्व करता है ([:alpha:] तथा [:digit:]).

[:space:]

Represents a space character (but not other whitespace characters).

[:print:]

छापे जाने वाले अक्षर का प्रतिनिधित्व करता है.

[:cntrl:]

छापे नहीं जाने वाले अक्षर का प्रतिनिधित्व करता है.

[:lower:]

Represents a lowercase character if Match case is selected in Options.

[:upper:]

Represents an uppercase character if Match case is selected in Options.


उदाहरण

e([:digit:])? -- finds 'e' followed by zero or one digit. Note that currently all named character classes like [:digit:] must be enclosed in parentheses.

^([:digit:])$ -- finds lines or cells with exactly one digit.

You can combine the search terms to form complex searches.

To find three-digit numbers alone in a paragraph

^[:digit:]{3}$

^ means the match has to be at the start of a paragraph,

[:digit:] matches any decimal digit,

{3} means there must be exactly 3 copies of "digit",

$ means the match must end a paragraph.