Tags » Regex

Visual debug tool for Regular Expressions

When working with regular expressions, it can be difficult to understand why a particualar pattern is not working as you would expect.

The visual debug tool at… 34 more words

Shortcuts

Regular expressions: patterns and searching

The regular expression lesson from Automate The Boring Stuff was particularly difficult, but I also knew it was one of the more useful parts of the book. 900 more words

Automate The Boring Stuff

Regular Expressions - Character classes

Character classes match a character from a specific set.

Dot (.)

This match any character except line break. Equivalent to[^\n\r]

Match any ([\s\S])

This will match any character including line break. 108 more words

Regex

Why You Shouldn't Validate Emails with Regex

Foo, a programmer working at FooBar Inc., is happily working on a registration form, when he think to himself,

“Hmm. I should probably check if the email is valid.” 522 more words

General Programming

Regular Expressions Part 02

Hi all, from a previous post we talked about regular expressions and get a basic idea about regular expressions. From this post I’m going to look into more about regular expressions. 163 more words

Programming Languages

Regex- Find words that start with a specific character

Regex- Find words that start with a specific character


string s = "Update tbl set Name=@Name , Age=@Age Where Id=@Id";
foreach (Match match in Regex.Matches(s, @"@(\S+)\s?"))  //or,  //@"(?<!\w)@\w+"
{
    Console.WriteLine(match.Value);
}

//Output
  @Name
  @Age
  @Id

Regular Expressions

What are Regular Expressions?

Regular Expression is a pattern describing a certain amount of text. Also known as RegEx or RegExp. Can be used for validating user inputs such as email addresses, find a specific String from a text and etc. 584 more words

Programming Languages