DiGrande.it

Blind, Braille and Embossing Technologies

This site uses cookies to personalize content and ads, provide social media features and analyze links. By closing this banner or continuing to browse, you consent to their use.
Read the DiGrande.it Cookie Policy

Previous text (Tp)

Instruction: Tp"%"

Parameter: "%" text consisting of absolute characters, type, or family.

Return: true if the previous text matches the specified group.

Description:

Ritorna true se il testo precedente soddisfa i caratteri specificati nel gruppo. I caratteri del gruppo possono essere assoluti, di tipo o di famiglia.

Un carattere assoluto è quello immediatamente confrontabile, per esempio "abc123", cioè tutti i caratteri del set unicode.

I caratteri di tipo sono quelli appartenenti a una tipologia di caratteri, come lettere, consonanti, vocali, numeri ecc..

Un carattere di famiglia identifica una sequenza di caratteri dello stesso tipo, come lettere, numeri, punteggiatura o spazi.

Un carattere di tipo o di famiglia viene specificato utilizzando l'attivatore "\" (Barra inversa) seguito dal tipo di carattere. L'elenco dei caratteri di tipo e di famiglia è il seguente:

\* - Any character except space

\w - Any letter or number

\? - Any letter

\# - Any number

\% - Any normal consonant

\$ - Any consonant with diacritic

\z - Any consonant

\& - Any normal vowel

\@ - Any vowel with diacritic

\a - Any vowel

\< - Any lowercase letter

\> - Any uppercase letter

\_ - Any punctuation

\' - Any apostrophe

\- - Any hyphen

\! - Any character other than letters, numbers, and punctuation

\s - Any space

\n - Any null character (for example, at the end or beginning of a line)

\\ - The backslash itself

\L - A sequence of letters

\N - A sequence of numbers

\W - A sequence of letters or numbers

\P - A sequence of punctuation

\S - A sequence of spaces

\x - Includes space comparison (default flag)

\X - Excludes space comparison. If specified, the comparison index moves backward until a non-space character is encountered

\c - Case-insensitive comparison (default flag)

\C - Case-sensitive comparison

It is necessary to respect the uppercase and lowercase letters of these wildcards. Text analysis is performed from right to left. In the case of using the command for space inclusion or exclusion and for case-insensitive comparison, these flags must be used from the right.

Example:

Condition: Tp"\N\X"

Description: Returns true if before the cursor there is text that satisfies the specified pattern. In this case, before the cursor, there must be any number, regardless of whether there are spaces between the cursor and the number. Note that the command for excluding spaces has been placed to the right of the condition text because it will be evaluated as the first element of the group.