开发者

Require a Regex in C#

I Required a Regex for the below input string:

Input data - ANALYSE/xxxxxxxx:

In the string xxxxxx is any characters. Need a regex accordingly to figure it out

At the end the colon is there but i need to replace entire 'ANALYSE/xxxxxxxx:' with String.empty.

I want to replace the above string with String.empty

The regex which i used 'A开发者_StackOverflowNALYSE/.*' is not getting.

Provide me a regex.


Do you really need a regex? Can't you just use

if (text.StartsWith("ANALYSE/"))

?

If you do definitely need a regex, just

ANALYSE/.*

will match appropriately. The removal side will depend on exactly what you want to do - if you could give a concrete example, that would make life easier.


Try building your own using this site: http://gskinner.com/RegExr/


Try ANALYSE/.*?:

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜