Wizards and RegEx with pipe sign
- Hello List,
I have a clip which extracts all the words from a given file against a
regexp pattern. The pattern is obtained by way of a wizard, whose
default value is the clipboard contents. This value is then used in a
^!GetDocmatchAll instruction. As I want to be able to fine-tune the query, I
then put the value entered through the wizard back into the clipboard.
But... If my regexp contains a pipe sign (|), I cant't get the entire
expression back at the next clip execution, I just have one part of it.
It seems actually that in the wizard, I can choose among the different
parts of the regex presented in a list...
If this is due to the meaning of the | sign in the wizards, is there any
way to bypass the special meaning of that sign?
- Jean-François Colas wrote:
> The pattern is obtained by way of a wizard, whoseNMy suggestion is to first read the clipboard intop a variable, replace
> default value is the clipboard contents.
any pipes there may be and then feed it to your wizard. The replace can
be non-regex, so bypassing any problems with metacharacters.