daily pastebin goal
19%
SHARE
TWEET

RegEx

a guest Feb 20th, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Text.RegularExpressions;
  3.                    
  4. public class Program
  5. {
  6.     public static void Main()
  7.     {
  8.          string txt="/*bilostaaa*/+++ ";
  9.  
  10.       string re1="((?:[a-z][a-z]+))";   // Word 1
  11.  
  12.       Regex r = new Regex(re1,RegexOptions.IgnoreCase|RegexOptions.Singleline);
  13.       Match m = r.Match(txt);
  14.       if (m.Success)
  15.       {
  16.             String word1=m.Groups[1].ToString();
  17.             Console.Write("["+word1.ToString()+"]"+"\n");
  18.       }
  19.       Console.ReadLine();
  20.     }
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top