Thursday, 5 September 2013

How to extract word by matching customized character/word as per user input using Regular Expressions

How to extract word by matching customized character/word as per user
input using Regular Expressions

I am trying to get the word match(es) for the character trimmed from the
word input by a user. So every time there would be a manipulation with a
regular expression. So how to make such regular pattern to adjust user
input?
Forexample:
I am a user and input a word "xyz" so first word/string should be split
into characters as x,y,z and then by using function Regex.Matches("String
Source to be scanned", "some regex pattern" xyz "some regex pattern").
What i want is:
that it could fetch all words starting with x or matching xyz.

No comments:

Post a Comment