DEC Text Processing Utility Data Types

3.7 Pattern Data Type

Given this sequence of definitions, a search for pat_var succeeds if DECTPU encounters the following string:

a5xcd

Because two pattern variables are linked, DECTPU searches first for the text that matches p1, then unanchors the search, and then searches for the text that matches p2.

To specify an anchored search when the right-hand subpattern is a pattern or keyword variable, use a plus sign ( + ). You must use a plus sign ( + ) to anchor the search if the right-hand subpattern is a keyword variable. If the right-hand subpattern is a pattern variable, you can use the ANCHOR keyword as the first element of that subpattern to anchor the right-hand subpattern.

For example, suppose you defined the following patterns:

p1 := LINE_BEGIN + "a";

p2 := "b" + LINE_END;

You anchor the search for p2 by using ( + ) as follows:

pat_var := p1 + p2;

If you use an ampersand ( & ), you unanchor the search for p2.

You can also anchor the search for p2 by defining p2 as follows:

p2 := ANCHOR + "b" + LINE_END;

3.7.3.3 (Pattern Alternation Operator)

The alternation operator ( ) tells SEARCH or SEARCH_QUIETLY to match a sequence of characters if those characters match either of the pattern elements separated by the alternation operator. The following pattern matches either the string abc or the string xes:

pat1 := "abc" "xes";

If the text being searched contains text that matches both alternatives, SEARCH or SEARCH_QUIETLY matches the earliest occurring match. If two matches start at the same character, SEARCH or SEARCH_QUIETLY matches the left element. For example, suppose you had the search text abcd and the following pattern definitions:

pat1 := "abc"

"bcd";

pat2 := "bcd"

"abc";

pat3 :=

"bc"

"bcd";

pat4 :=

"bcd"

"bc";

Given these definitions and search text, a search for the patterns pat1 and pat2 would return a range that contains the text abc. A search for the pattern pat3 would return a range that contains the text bc. Finally, a search for the pattern pat4 would return a range that contains the text bcd.

3.7.3.4 @ (Partial Pattern Assignment Operator)

The partial pattern assignment operator ( @ ) tells SEARCH or SEARCH_ QUIETLY to create a range that contains the text matching the pattern element to the left of the partial pattern assignment operator. When the search is completed, the variable to the right of the partial pattern assignment operator references the created range. If SEARCH or SEARCH_QUIETLY is given the search text abcdefg and the following pattern, it returns a range that contains the text abcdefg:

3–14DEC Text Processing Utility Data Types

Page 54
Image 54
Compaq AA-PWCBD-TE manual Pattern Alternation Operator, 3.4 @ Partial Pattern Assignment Operator

AA-PWCBD-TE specifications

The Compaq AA-PWCBD-TE is a highly regarded laptop battery designed to provide reliable power to a range of Compaq laptop models. As technology continues to evolve, the necessity for efficient and long-lasting batteries becomes increasingly important, especially for students, professionals, and anyone reliant on portable computing.

One of the standout features of the AA-PWCBD-TE is its impressive capacity, designed to enhance the performance of your device. With a power capacity of around 5200 mAh, this battery is engineered to provide extended usage times, allowing users to work on the go without frequent interruptions for recharging. The battery supports efficient energy management, contributing to the overall longevity of the device.

Additionally, the AA-PWCBD-TE integrates advanced lithium-ion technology, which is favored for its reliability and minimal memory effect. Lithium-ion batteries typically offer a higher energy density compared to older technologies, meaning they can store more energy in a smaller size. This technology also supports faster charging times, making it a convenient solution for busy users.

Safety is another vital characteristic of the AA-PWCBD-TE. It features built-in protection against overcharging, overheating, and short-circuit conditions, which helps ensure the safety of both the battery and the device itself. This level of protection is crucial, especially in professional environments where equipment failure can lead to productivity losses.

Compatibility is also a key aspect of the AA-PWCBD-TE, as it is designed to fit a variety of Compaq laptop models. Users can easily determine whether this battery is suitable for their specific model, simplifying the buying process and ensuring optimal performance.

In terms of weight and dimensions, the AA-PWCBD-TE is designed to be lightweight and compact, adding minimal bulk to the laptop while still delivering powerful performance. Users can enjoy the balance of efficiency and portability, making it an ideal choice for those who travel frequently or require a battery that doesn't compromise on power.

Overall, the Compaq AA-PWCBD-TE stands out as a dependable and efficient laptop battery that enhances the user experience. With its impressive capacity, cutting-edge technology, and safety features, it is a valuable accessory for anyone looking to improve their mobile computing capabilities.