Thursday, July 9, 2009

Official Google Blog: Introducing the Google Chrome OS

Official Google Blog: Introducing the Google Chrome OS

Google Chrome OS is an open source, lightweight operating system that will initially be targeted at netbooks. Later this year we will open-source its code, and netbooks running Google Chrome OS will be available for consumers in the second half of 2010. Because we're already talking to partners about the project, and we'll soon be working with the open source community, we wanted to share our vision now so everyone understands what we are trying to achieve.

Sunday, March 29, 2009

Regular Expressions Referance

Character Referance: Most .Net Regular expression operators are single characters. 
backslash\ signals to the .Net RegEx parser that next character is not an operator. 
e.g., the parser treats an asterisk (*) as a repeating quantifier and a backslash followed by an asterisk (\*) as the Unicode character.
 
Chars: Characters other than . $ ^ { [ ( | ) * + ? \ match themselves.

\b: Matches a backspace
\t: Matches a Tabspace
\r: Matches a Carriage Return
\v: Matches a vertical tab
\n: Matches a New line
\w: Matches any word character
\W: Matches any nonword character
\s: Matches any white-space character
\S: Matches any non-white-space character
\d: Matches any decimal digit
\D: Matches any non-decimal digit


Why Regular Expressions?

If you have worked a little in MS-DOS then you must remember those wildcards you sometimes use to find files or list directory contents...
legacy continued in Windows also suppose you want to search all your picture files you can type *.jpg;*.bmp;*.gif;*.png..... in the search box and windows will list you all those files having the specifed file extensions
This was a quick reference to Wildcards, but how is this related to Regular Expressions, lets take a look...

Most  programs include find and replace feature in them, some of them include Pattern Search and some include Regualar Expression to Find and replace content in files...

Regular Expressions just not add string searching capability to language but you can use Regular Expressions to replace a variety of text from files/strings.

Suppose you want to Search for valid e-mail addresses in a file then you can execute given pattern to list all those email address:

Email Address RegEx Pattern:  
[a-z0-9_-]+(?:\.[a-z0-9_-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?

this was a quick introduction to Regular Expressions

Sunday, March 22, 2009

RegExpert: .Net Regular Expressions Simplified

Download RegExpert by Rajeev Dhiman

RegExpert is a Programmers' utility that helps learn, develop and test Regular Expressions. It is an interactive Windows application that is designed to be powerful yet simple and easy to use.

About RegExpert Interface

  1. Source Text: this will Contain the text source (Input) on which you would like to test your pattern

  2. Pattern String: this will contain the pattern you would like test/find in Input string.

  3. Regular Expression Options: Here you would modify Options for your regular expression execution.
  4. Results Grid: After successful execution results are displayed in Grid format.

So What are those tabs for

  • Regular Expression Test: This tab enlist the Test Results it finds after a successful pattern execution

  • Replace:You may like to create an output string, replacing the found text with text of your like. Replace Tab is to play with that

  • Regular Expression Split: Generate an array of string split by pattern it find

  • Regular Expression Language Reference: If you Wonder how does all those patterns work, or want to learn about the root terminology of .Net Framework Regular Expressions See what MSDN has to say on these terms

Features
  • The Regex match results are listed in a Grid with levels for Matches, Groups and Captures. Clicking on a Match, Group or Capture will highlight it in the Input text window
  • Favorites Support to Store your mostly used Regular Expressions
  • The Language Element window is an embedded reference that gets you up to speed quickly. Click on an item to see a description in the pane below, double-click a language element to add it to your Regex
  • Find text in Source Text
  • Supports very large values for the input text
  • Supports Copy Results from Results Grid
  • Supports Results exporting to Text or CSV File
  • Supports Loading Source Text directly from a File or from the Internet
  • Supports Sample Code Export to VB or VB.Net Project
  • Match and Groups Highlighting in Source Text in different colors
Using RegExpert
  1. Just Paste some text in source text Box
  2. Type your Regular Expression Pattern in Textbox provided for the same/ or your may like to try something ready to use Regex (from the Quick picks list)
  3. Press the Execute Button or F5
  4. If Pattern succeeded you have results in the Matches Grid

Download: RegExpert by Rajeev Dhiman