In this example, these characters would be used to pair lines between files You would likely therefore check the second item in the list ( 1), so that lines containing #define directives are paired (or not paired) based only upon their identifiers. The second ( 1) is the sequence of characters ( SOME_IDENTIFIER123) matched by the sub-expression. the #define and the following identifier). The first ( All) is the sequence of characters ( #define SOME_IDENTIFIER123) matched by the entire regular expression (i.e. The sub-expression list for this example line will show two entries. Now consider the following example line when used with this regular expression: #define SOME_IDENTIFIER123 200 This sub-expression is the #define directive’s identifier. This expression contains a single sub-expression, which is marked by its being enclosed in parentheses. You may, however, wish to use only part of the text that was matched.įor example, if you wished to pair C/C++ #define directives based on the identifier being defined, you could use an expression like this: ^\s*#define\s+(_]_]*) Use sequences of characters matching these selected sub-expressions to pair linesīy default, Merge will use the entire sequence of characters that matches a regular expression to pair lines. You can enter a sample line of text into this field to see which parts will be matched by the regular expression you have entered and thus be used for line-pairing. See Use sequences of characters matching these selected sub-expressions to pair lines below for further information. However, it is also possible to use sub-expressions so that only parts of the text matched by the regular expression are used to pair lines. The status text underneath the entry field indicates whether the provided regular expression is syntactically correct.īy default, when a line matches the regular expression, all of the matching characters are used for line-pairing. A summary of regular expression syntax may be found below. Provide the regular expression definition in this field. Use this field to provide a succinct description of the line-pairing rule. Please see the Line Pairing topic for further information about the purpose of line-pairing rules. Use the controls in this window to edit the definition of a line-pairing rule.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |