using a variable in regex javascript with boundary marker

JavaScript
re = new RegExp(`\\b${sa}\\b`, 'gi');

Source

Also in JavaScript: