1. Replacing MS Word's quotation marks in VB.NET

    When dealing with text pasted from Microsoft Word, the presence of "special" (read: non-ASCII) quotation marks and apostrophes can be quite troublesome. Here's a simple way to convert them to "standard" (read: ASCII) quotation marks and apostrophes...

    VB.NET Code:

    1
    2
    myString = Regex.Replace(myString, "\u201C|\u201D", """")  
    myString = Regex …
    read more
  2. Consuming newlines with the Javascript regex engine

    In most server-side languages (with an available regex engine), programmers are given a wonderful set of pattern modifiers. One such modifier for PCRE (Perl-compatible regular expressions) is the "s" modifier, known in PHP as the constant PCRE_DOTALL. This modifier will cause the "dot" character--which will usually match any normal character--to …

    read more
  3. « Page 2 / 2