ARAHN Forum Index ARAHN
A_R_A_H_N
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

عبارا&

 
Post new topic   Reply to topic    ARAHN Forum Index -> Test Forum 1
View previous topic :: View next topic  
Author Message
developzoom



Joined: 22 May 2016
Posts: 35

PostPosted: Wed Aug 31, 2016 6:22 pm    Post subject: عبارا& Reply with quote

[right]عبارات با قاعده در سی شارپ(Regular Expressions)

عبارت با قاعده، یک الگو است که می تواند با متن ورودی تطبیق داده شود. .Net framework یک موتور عبارت با قاعده فراهم کرده است که به چنین تطبیق هایی اجازه می دهد. الگوی متشکل از یک یا چند لیترال ، اپراتورها، یا ساختارها است.

تعریف عبارات با قاعده

دسته بندی های مختلف از کاراکترها، اپراتورها، و ساختارها وجود دارند که به شما اجازه می دهند تا عبارات منظم را تعریف کنید.

Character escapes
Character classes
Anchors
Grouping constructs
Quantifiers
Backreference constructs
Alternation constructs
Substitutions
Miscellaneous constructs
کلاس عبارت منظم (The Regex Class)

Regex class برای نشان دادن عبارت منظم استفاده می شود. روش استفاده از آن معمولی است و در زیر آمده است:



Sr.No Methods
۱ public bool IsMatch(string input)
Indicates whether the regular expression specified in the Regex constructor finds a match in a specified input string.
۲ public bool IsMatch(string input, int startat)
Indicates whether the regular expression specified in the Regex constructor finds a match in the specified input string, beginning at the specified starting position in the string.
۳ public static bool IsMatch(string input, string pattern)
Indicates whether the specified regular expression finds a match in the specified input string.
۴ public MatchCollection Matches(string input)
Searches the specified input string for all occurrences of a regular expression.
۵ public string Replace(string input, string replacement)
In a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string.
۶ public string[] Split(string input)
Splits an input string into an array of substrings at the positions defined by a regular expression pattern specified in the Regex constructor.
برای مشاهده لیست کامل از متدها و خصوصیات، لطفا مستندات مایکروسافت در# C را مطالعه کنید.

آموزش برنامه نویسی[/right]
_________________
چاپ دیجیتال
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ARAHN Forum Index -> Test Forum 1 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
100webspace web hosting VPS hosting advantages of online dating