I want to use below expression in my program but i don’t know what do this regular expression!
please help me.
"(?=(?!^)[,;.:])|(?<=[,;.:])"
in the above expression (?=(?!^)[,;.:]) find any character set that end with [.;,:] or no? what do this (?!^) in this expression?
and this expression find any character set that end with [,;.:] or no?
please help me.
The expression matches 0-length strings that satisfy one of these two conditions:
,;.:, but not for 0-length strings just before the beginning of the subject string (position 0). So the subject string"."has no match at position 0, only at position 1 because of the following alternative. This is done with positive lookahead (?=) and negative lookahead (?!).,;.:. This is done with positive lookbehind (?<=).For instance for
"aaa,1", you have two matches: at position three (after the lasta, because it’s followed by,) and at position 4 (because it’s preceded by,).