Frank GOENNINGER
5/7/2016 9:39:00 AM
Hi again,
.... working my way through perl regexes.
I have (using cl-ppcre):
(multiple-value-bind (match regs)
(scan-to-strings "^([A-Z]) (.*);|^\\([a-z_]*)|^([a-z]);"
"\\dump_state"))
This piece of code gives the following error:
Expected end of string. at position 25 in string "^([A-Z]) (.*);|^\\([a-z_]*)|^([a-z]);"
[Condition of type PPCRE-SYNTAX-ERROR]
When I remove the second pair of () the error vanishes...
When I use Eddi's Regex Coach (thanks, Eddi!) I don't get an error -
but a wonderfully parsed split string list.
I want to be able to match the following cases:
"F 1234;" -> A single uppercase char, followed by a space, followed by a
"value", followed by a semicolon;
"f;" -> A single lowercase, followed by a semicolon;
"\dump_state" -> A backslash, followed by a sequence of lowecase chars
which may also be an underscore.
Any help or hint much appreciated!
Thx!
;;; Frank