Why Nostr? What is Njump?
2023-10-20 01:40:16

Adam on Nostr: I must have my thoughts crossed as for the life of me I can't seem to figure out this ...

I must have my thoughts crossed as for the life of me I can't seem to figure out this regex in BASH using a parameter expansion.

I want to search for 2 or more dashes and then replace with one dash. Here is what I thought would work, but doesn't.

string="Hello-World! #debug command---line"
string="${title//[-]{2,3}/-}"

#bash #regex #askfedi #AskFediverse
Author Public Key
npub17nxkt8705lz7609j3clv6dregg8advm870066r26dva5m09umwcqjm3ncu