Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RegEx to find whitespace around separator in the a Java properties file
/**
* Use a lookbehind to make sure we dont accidentaly find ` = ` in the value.
* Prefer the likeliness of missing positive, than getting false positives.
*/
(?<=[a-zA-Z].)+((\s)=(\s)){1}(?=[a-zA-Z])+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.