In our application we define variables starting with "${" followed by variableName and a closing "}".
But the following versions does not work:
<xs:pattern value="\$\{*\}" />
<xs:pattern value="[${]*\}" />
I think i did not escape the $ s properly, but did not find out how to do it.
Asked
Active
Viewed 16 times
0

Shorty123
- 539
- 1
- 7
- 26
-
1Escape it. Or, use in square brackets. – Wiktor Stribiżew Oct 14 '19 at 07:48
-
Thank you for the quick answer but i tried the two versions above but they are not working. – Shorty123 Oct 14 '19 at 07:58
-
1`$` and `{` are two chars that make a sequence, right? Do what I said: escape `$`. `"\${"`. Or put the `$` inside brackets: `"[$]{"`. If you plan to match a string like `${...}` use `"\$\{.*}"`. Or `"\$\{[^{}]*}"`. I see your question is actually more complex than what you put in the title and the initial question body. – Wiktor Stribiżew Oct 14 '19 at 08:03
-
Thanks now it works: \$\{[a-z]+\} – Shorty123 Oct 14 '19 at 08:23
-
1So, you also had a "hidden" requirement for `variableName` syntax. – Wiktor Stribiżew Oct 14 '19 at 08:24