Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-06-24 14:59
Flavor·ECMAScript (JavaScript)

/
(\w{2}).*?\b
/
gm
Open regex in editor

Description

It grabs 2 first characters from a word. So:

  • please will be pl
  • sure and sun will be su
  • white and what will be wh

Go to substitute mode for the result to appear :)

Submitted by anonymous