Regex - Lookaheads

^(?!\/boot).*$

Will not match:

  • /boot
  • /boot2
  • /bootrecover

Will match:

  • /fs1
  • /file
  • /disk
  • etc.

^(?!\/boot\b).*$

Will not match:

  • /boot

Will match:

  • /boot2
  • /bootrecover
  • /fs1
  • /file
  • /disk
  • etc.

Previous Post Next Post