1*17f9a364Spgoyette# Let's have some fun -- try to match a C comment. 2*17f9a364Spgoyette# first the obvious, which looks okay at first glance... 3*17f9a364Spgoyette/\*.*\*/ - /*x*/ /*x*/ 4*17f9a364Spgoyette# but... 5*17f9a364Spgoyette/\*.*\*/ - /*x*/y/*z*/ /*x*/y/*z*/ 6*17f9a364Spgoyette# okay, we must not match */ inside; try to do that... 7*17f9a364Spgoyette/\*([^*]|\*[^/])*\*/ - /*x*/ /*x*/ 8*17f9a364Spgoyette/\*([^*]|\*[^/])*\*/ - /*x*/y/*z*/ /*x*/ 9*17f9a364Spgoyette# but... 10*17f9a364Spgoyette/\*([^*]|\*[^/])*\*/ - /*x**/y/*z*/ /*x**/y/*z*/ 11*17f9a364Spgoyette# and a still fancier version, which does it right (I think)... 12*17f9a364Spgoyette/\*([^*]|\*+[^*/])*\*+/ - /*x*/ /*x*/ 13*17f9a364Spgoyette/\*([^*]|\*+[^*/])*\*+/ - /*x*/y/*z*/ /*x*/ 14*17f9a364Spgoyette/\*([^*]|\*+[^*/])*\*+/ - /*x**/y/*z*/ /*x**/ 15*17f9a364Spgoyette/\*([^*]|\*+[^*/])*\*+/ - /*x****/y/*z*/ /*x****/ 16*17f9a364Spgoyette/\*([^*]|\*+[^*/])*\*+/ - /*x**x*/y/*z*/ /*x**x*/ 17*17f9a364Spgoyette/\*([^*]|\*+[^*/])*\*+/ - /*x***x/y/*z*/ /*x***x/y/*z*/ 18