J
jg
1. backreference
how do I reference and named matched expression in the pattern
suppose I have specified (abc(?<mymatch>,\s+)|(?<mm2>[-/.]))xyz
and if mm2 was matched previously, I want the same matched mm2 char to
be matched after xyz
but if mymtach was matched previously, I want to match space after
space
In order word I want to match only "abc, xyz " , "abc-xyz-","abc/xyz/",
or "abc.xyz."
I must be thick, I tried (?(mm2)<mm2> and my interpretation of
alternation syntax, all end up with syntax error
2. Alternation
I saw the syntax on Microsoft
(?(expression)yes|no)
and
(?(name)yes|no)
How do I make user of yes part?
how do I reference and named matched expression in the pattern
suppose I have specified (abc(?<mymatch>,\s+)|(?<mm2>[-/.]))xyz
and if mm2 was matched previously, I want the same matched mm2 char to
be matched after xyz
but if mymtach was matched previously, I want to match space after
space
In order word I want to match only "abc, xyz " , "abc-xyz-","abc/xyz/",
or "abc.xyz."
I must be thick, I tried (?(mm2)<mm2> and my interpretation of
alternation syntax, all end up with syntax error
2. Alternation
I saw the syntax on Microsoft
(?(expression)yes|no)
and
(?(name)yes|no)
How do I make user of yes part?