GNU M4: Define a rule that matches text, and operates on that matched text?
问题 Suppose I have: File: [x] And I would like to define m4 macro: define(`\[.*\]`, ...) Question: Is this possible and how does one do it? 回答1: It isn't possible as you can see in manual of m4: 3.1 Macro names A name is any sequence of letters, digits, and the character ‘_’ (underscore), where the first character is not a digit. m4 will use the longest such sequence found in the input. If a name has a macro definition, it will be subject to macro expansion (see Macros). Names are case-sensitive.