-1

I am using the regex to match the word with colon present only at the beginning of each line:

/[^\r\n:-][^\r\n:]*:\s*/g

Following is the text I want to match with. The problem is, it also matches the 2nd Blah: on 3rd row. Which I don't want.

Blah Blah: dsfdffsdfsdfsds

Blah: dsffsffsdfsdfds

Blah: dsffsfds Blah:fsfsfssdfs

Hari Das
  • 10,145
  • 7
  • 62
  • 59

1 Answers1

-1

you can use this regex ^[:] to do it.

kumaranc
  • 105
  • 1
  • 11