开发者

Get Groups From Words

I'm struggling to write a reg-ex that can do the following:

Label1.Caption := Edit1.Text;

Must return 2x results e.g.:

Label1.Caption
Edit1.Text

So its everything where its a word (Like "La开发者_开发百科bel1"), a dot (.) and a given set of words like "Caption", "Text" etc.


([\w.]+)\s*:=\s*([\w.]+)

This regex is more flexible than what you specified. Something like __hello...6 := oops will also pass. If you need the restrict to the Identifier.Identifier format,

([A-Za-z_]\w*\.[A-Za-z_]\w*)\s*:=\s*([A-Za-z_]\w*\.[A-Za-z_]\w*)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜