What is Nostr?
postmodern /
npub14ck…2qs4
2024-07-14 03:31:58

postmodern on Nostr: How can you use String#scan or String#=~ with a UTF-8 regex against either an ...

How can you use String#scan or String#=~ with a UTF-8 regex against either an ASCII-8bit String or a force_encoded ASCII-8bit -> UTF-8 String (potentially binary data like an image file)? Should I call String#scrub first?
#ruby
Author Public Key
npub14ck97r2hvl2ggker25pv767kl32pxdqqns5zyx4n609emxy47smsru2qs4