Topic: Search for multiple commas (1 of 4), Read 17 times
Conf: Search and Replace
From: Mike Chase
Date: Monday, May 08, 2006 07:41 PM

I receive comma delimited files in which the fields aren't enclosed in quotes. Not a problem until the data includes embedded commas. Is there a way to search for multiple instances of a comma within a line, say more than seven? I could then manually edit as appropriate.

Thanks!

 


Topic: Search for multiple commas (2 of 4), Read 16 times
Conf: Search and Replace
From: Christian Ziemski
Date: Tuesday, May 09, 2006 09:14 AM

You may find some info here:

Conference: "Basic editing, Block operations"
Topic: "counting special characters"
Date: 11/30/2005

Direct link: http://webboard.vedit.com/read?19905,43


Christian

 


Topic: Re: Search for multiple commas (3 of 4), Read 14 times
Conf: Search and Replace
From: Ted Green
Date: Tuesday, May 09, 2006 09:35 PM

At 07:41 PM 5/8/2006, you wrote:
>From: "Mike Chase"
>
>I receive comma delimited files in which the fields aren't enclosed in quotes. Not a problem until the data includes embedded commas. Is there a way to search for multiple instances of a comma within a line, say more than seven? I could then manually edit as appropriate.

This is actually quite simple.
VEDIT's regular expressions are limited to searching on one line.
Therefore, the following RE will match a line with 8 or more commas:

,.+,.+,.+,.+,.+,.+,.+,

Start at the beginning of the file.
Press .
Select (x) Regular expression.
Enter (paste) the string above.
Press [Next].

Ted.

 


Topic: Re: Search for multiple commas (4 of 4), Read 15 times
Conf: Search and Replace
From: Christian Ziemski
Date: Wednesday, May 10, 2006 02:52 AM

On 5/9/2006 9:35:06 PM, Ted Green wrote:
>
>This is actually quite simple.
>VEDIT's regular expressions are limited to searching on
>one line. Therefore, the following RE
>will match a line with 8 or more commas:
>
> ,.+,.+,.+,.+,.+,.+,.+,
>
>Start at the beginning of the file.
>Press .
>Select (x) Regular expression.
>Enter (paste) the string
>above.
>Press [Next].

WebBoard didn't convert your posting correctly.
The expression "lower-than F2 greater-than" is interpreted as HTML-Tag and so invisible.

A try with < and <:


,.+,.+,.+,.+,.+,.+,.+,

Start at the beginning of the file.
Press <F2>.
Select (x) Regular expression.
Enter (paste) the string above.
Press [Next].


Christian