anchor.diff:      let rec private andImpl (regex1 : Regex) (regex2 : Regex) =
           cont {
           match regex1, regex2 with
  -        | CharacterSet charSet, _
  -        | _, CharacterSet charSet
  -            when CharSet.isEmpty charSet ->
  +        | Empty, _
  +        | _, Empty ->
               return empty
   
           | CharacterSet charSet1, CharacterSet charSet2 ->
  +            let intersection = CharSet.intersect charSet1 charSet2
  +
  +            // If the intersection of the two charsets is empty, this pattern
  +            // can never be matched, so return the Empty pattern.
               return
  -                CharSet.intersect charSet1 charSet2
  -                |> CharacterSet
  +                if CharSet.isEmpty intersection then
  +                    empty
  +                else
  +                    CharacterSet intersection
  +
  +//        | Star (CharacterSet charSet1), Star (CharacterSet charSet2) ->
  +//            return
  +//                CharSet.intersect charSet1 charSet2
  +//                |> CharacterSet
  +//                |> Star
   
           | Any, regex
           | regex, Any ->
  
positive.code:     let rec private orImpl (regex1 : Regex) (regex2 : Regex) =
          cont {
          match regex1, regex2 with
          | CharacterSet charSet, regex
          | regex, CharacterSet charSet
              when CharSet.isEmpty charSet ->
              return regex
  
          | CharacterSet charSet1, CharacterSet charSet2 ->
              return
                  CharSet.union charSet1 charSet2
                  |> CharacterSet
  
          | Any, _
          | _, Any ->
  
negative.code:     [<CompiledName("CreateStar")>]
      let rec star (regex : Regex) : Regex =
          match regex with
          | Epsilon
          | Empty ->
              Epsilon
          | Or (Epsilon, regex)
          | Or (regex, Epsilon)
  