This Article explores the concept of Regular Expressions in the context of C#, .NET support for Regular
Expressions, Meta-characters and their Description, Character Escapes, Substitutions, Character Classes, Regular Expression Options and Atomic Zero-Width Assertions.
What are regular expressions?
Regular expressions are Patterns that can be used to match strings. You can call it a formula for matching strings that follow some pattern. Regular expression(s) can be considered as a Language, which is designed to manipulate text. You can then ask questions such as
“Does the given string match the pattern?”, or “Does the given string contain characters that match a pattern?”. Regular Expressions may be used to find one or more occurrences of a pattern of characters within a string. You may choose to replace it with some other characters or perform some other tasks based on the results obtained. These patterns of characters can be simple or very complex. Regular Expressions generally comprises of two types of characters –
1) Literal or Normal Characters such as “abcd123” 2) Special Characters that have a special meaning such as “.” Or “$” or “^”
Due to the special characters Regular Expressions form a very powerful means of manipulating strings and text.
.NET support for Regular Expressions:
.Net provides an extensive set of Regular expressions which you could use to create, modify or compare strings. They can be classified as follows –
a) Character Escapes b) Substitutions c) Character Classes d) Regular Expression Options e) Atomic Zero-Width Assertions f) Quantifiers g) Grouping Constructs h) Backreference Constructs i) Alternation Constructs j) Miscellaneous Constructs
I am running this Blog to help other guys, who are looking some bits and pieces in terms of MS technology....
Subscribe to:
Post Comments (Atom)
Split the String values with a special character in MS Flow to convert this into Array
Many times we have a requirement to prepare the Mailing address for some of the documents, suppose there are Address Line1, Address Line2, ...
-
Use the following line of code to Reopen the closed task in CRM 2011 // Re-open the Task to update it SetStateRequest ssr = new SetStat...
-
Use the following line of code to create complete workflow activity with two output parameters. 1) Open Visual Studio 2010 ID. 2) Open ...
-
Sometimes you experienced when you have subgrid in your CRM Form, but when you click the ‘expand’ button to expand the view then it will re...
No comments:
Post a Comment