Fixed: [Need to add the possibility to use anchors around patterns #51](https://github.com/clicon/cligen/issues/51):
* Dont escape `$` if it is last in a regexp in translation from XML to POSIX.
This commit is contained in:
parent
918bf6223b
commit
9d2102cebf
3 changed files with 188 additions and 169 deletions
|
|
@ -179,7 +179,7 @@ regexp_xsd2posix(char *xsd,
|
|||
}
|
||||
else if (x == '\\')
|
||||
esc++;
|
||||
else if (x == '$')
|
||||
else if (x == '$' && i != strlen(xsd)-1) /* Escape $ unless it is last */
|
||||
cprintf(cb, "\\%c", x);
|
||||
else if (x == ']' && minus){
|
||||
cprintf(cb, "-]");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue