.net - Regex ? in lookbehind not consuming -


lookbehind ? not consuming :

regex:

(?i)(?<=\bsubject:?).+$ 

text:

subject: asdf adsf

match

: asdf adsf

i don't want : included in match

if search on:
subject asdf adsf
matches:
asdf adsf
behavior want
appears treat : optional not consuming

if match on subject:? greedy , includes :

use regex (?i)(?<=\bsubject:?)[^:].*$


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -