Results 1 to 5 of 5

Thread: [solved] RegEx for comments

Threaded View

  1. #1

    Thread Starter
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552

    Resolved [solved] RegEx for comments

    How do I catch up the C# comments?
    Code:
    // This is a comment
    /// This is a comment
    /* This
       is
       a
       comment
    */
    Code:
            $comments="/(\/\/.*\n)/";
            $string=preg_replace($comments,"<span style='color:#007700'>$1</span>",$string);
    Didn't work. Any help is greatly appreciated. Thank you.
    Last edited by brown monkey; Oct 1st, 2004 at 03:23 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width