manish patel
manish patel

Reputation: 1449

find a pattern on string

I am giving you an example for what I am exactly want.

Example string:

If you're on a work BES system (work issued BlackBerry most likely with a BlackBerry server) then the "www.blackberry.com" BlackBerry follows the Exchange servers rules (aka if outlook redirects your email to a folder, then so does BlackBerry). However, there is an email option that you tell your BlackBerry not to show messages in other folders other than Inbox.

A web link is inside this paragraph. How can I find this Weblink (www.blackberry.com) from this paragraph in my C# application.and i want to find it any type of string

Upvotes: 0

Views: 463

Answers (2)

user197015
user197015

Reputation:

You're talking about finding any hyperlink in a block of text with a regular expression? Jeff Atwood wrote about this a while back. Although in the end he uses a little bit more than just a pure regex.

Upvotes: 3

Duncan Bayne
Duncan Bayne

Reputation: 3959

You can use the System.Text.RegularExpressions.Regex class to search for patterns. There is a tutorial on DevHood.com that goes into regular expression matching in some detail, with C# examples.

Upvotes: 0

Related Questions