vrijdag 14 juli 2017

Regex match until you find letter

WhatMShallTweMdoT

/^.+?(?=M)/g

(.+?) makes the regex non-greedy.
(?=M) is the condition. This is a postive lookahead assertion.

What is matched is: What

For more information:
https://stackoverflow.com/questions/7124778/how-to-match-anything-up-until-this-sequence-of-characters-in-a-regular-expres

For the regex engine:
http://regexr.com

Enlarging Libreoffice window completely with command

 You can open the LibreOffice window completely by pressing the CTRL+Shift+J keys together.