Re: Regular Expression for Finding and Deleting comments

2011-01-04 Thread MRAB
On 04/01/2011 19:37, Jeremy wrote: On Tuesday, January 4, 2011 11:26:48 AM UTC-7, MRAB wrote: On 04/01/2011 17:11, Jeremy wrote: I am trying to write a regular expression that finds and deletes (replaces with nothing) comments in a string/file. Comments are defined by the first non-whitespac

Re: Regular Expression for Finding and Deleting comments

2011-01-04 Thread Jeremy
On Tuesday, January 4, 2011 11:26:48 AM UTC-7, MRAB wrote: > On 04/01/2011 17:11, Jeremy wrote: > > I am trying to write a regular expression that finds and deletes (replaces > > with nothing) comments in a string/file. Comments are defined by the first > > non-whitespace character is a 'c' or a

Re: Regular Expression for Finding and Deleting comments

2011-01-04 Thread MRAB
On 04/01/2011 17:11, Jeremy wrote: I am trying to write a regular expression that finds and deletes (replaces with nothing) comments in a string/file. Comments are defined by the first non-whitespace character is a 'c' or a dollar sign somewhere in the line. I want to replace these comments

Regular Expression for Finding and Deleting comments

2011-01-04 Thread Jeremy
I am trying to write a regular expression that finds and deletes (replaces with nothing) comments in a string/file. Comments are defined by the first non-whitespace character is a 'c' or a dollar sign somewhere in the line. I want to replace these comments with nothing which isn't too hard. T