Skip to main content

Type Alias: SoftWordBreakRegExpString

SoftWordBreakRegExpString = string

Defined in: cspell-types/dist/index.d.mts:1392

Represents a regular expression used for word break rules.

The matching string will be prefixed and suffixed with a soft-hyphen. If the matching string is zero length, only a single soft-hyphen will be inserted. It is best to use lookahead and lookbehind assertions to ensure correct word break positions.

Examples:

  • "/(?<=\\bptr)/" -- The break would occur after the ptr, helping with pointer definitions starting with ptr, such as ptrvalue.
  • "/(?<=\\bI)(?=[A-Z])/" -- The break would occur before an uppercase letter following an I at a word boundary, helping with interface definitions like IError.

Since

10.3.1