Update base.js

now replaces with regex