Skip to content

Instantly share code, notes, and snippets.

@iamjono
Last active August 29, 2015 13:57
Show Gist options
  • Save iamjono/9416682 to your computer and use it in GitHub Desktop.
Save iamjono/9416682 to your computer and use it in GitHub Desktop.
lp_string_zap - Lasso 9 method for zapping gremlins
/* ============================================
Lasso 9 port of Bil Corry's lp_string_zap for Lasso 8.
Jonathan Guthrie, Feb 2013
============================================ */
define lp_string_zap(text_to_zap, replacement_text = void, ...) => {
not local_defined('replacement_text') ? local(replacement_text = '')
return string_replaceregexp(#text_to_zap, -find = '[^\\x20-\\x7E\\x09\\x0A\\x0D]', -replace = #replacement_text)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment