in reply to How to make substitute greedy like sed's substitute
I would endorse Jenda's advice to avoid regexes for parsing (X|HT)ML.
However,
$scalarWorkingConfig =~ s/.*(XXXXX[ | ]*<$domainProperty .*$domainProperty>).*/$1/g;
suggests a misunderstanding of the syntax of character classes (i.e., the [chars] construct; see perlre and Using character classes in perlretut and also perlrequick). The '|' (pipe) character is not special (i.e., is not a metacharacter) in a character class, nor has the repetition of characters any significance. The character class [ | ] is the equivalent of [ |] and consists of a blank-space character and a pipe character.
|
|---|