0

I do have one large text file with lot of the following patterns;

because of,this 
or that,has 
or,not

Of course I want to change the following

because of, this
or that, has
or, not

To make myself clear: i would like to insert a space after each ,

How can i do that with BBEdit Find/Replace/Grep?

enter image description here

Find works ok with

[\,](\w)

but i can't figure out the coresponding part for replace.

Cyrus
  • 84,225
  • 14
  • 89
  • 153
Louis
  • 101
  • 3

3 Answers3

1
Find: (\,)(\w)
Replace: \1 \2

Note: You need to hit the spacebar between \1 and \2. Works on my computer with BBedit v13

Supertech
  • 746
  • 1
  • 9
  • 25
0

I complicates matters.

Pattern like Letter,Letter can also be found with ,\b.

\b is at the beginning or end of a word. \b in a regular expression means "word boundary".

The replacement is then done with ,_

Nota Bene: _ is a "Space" after ,

Louis
  • 101
  • 3
0

you could just replace all commas with a comma-space and then replace all space-space with space

Tyler Collins
  • 127
  • 10