-1

I need to format telephone number from 787877878 to 78 787 78 78, can anybody tel me how to create filter for this?

Divyesh
  • 19
  • 7

1 Answers1

1

Filter

You can use this little snippet of code if you modify it for your needs, it uses a regex, slice and a switch.

Fiddle

Sudharsan S
  • 15,336
  • 3
  • 31
  • 49
Joe Lloyd
  • 19,471
  • 7
  • 53
  • 81