7
            
            votes
        
        
            
        Syntax Error on ssed for Regex Subroutine definitions
                    tl;dr: Forget about ssed. Use perl.
Here's why:
ssed is abandonware.  It was last updated in Oct 2005.  Its home page on sourceforge is gone (and I can't find any replacement on github or gitlab).
...
                
            
       
        
            
                6
            
            votes
        
        
            
            
        Help w/ "posix-extended" regex for 'find'
                    Instead of A-Za-z, you can use the posix character class [:alpha:], and instead of A-Za-z0-9 you can use [:alnum:].  And [:digit:] instead of 0-9.  So your find command using extended regexps could be ...
                
            
       
        
            
                5
            
            votes
        
            
                
                Accepted
            
        
            
        Perl RegEx one-liner that outputs all matches from one line of STDIN
                    echo '"this text", " ", "is in speech marks"' |
   perl -lne 'print for /"(.*?)"/g'
Or:
echo '"this text", " ", "is in speech marks&...
                
            
       
        
            
                5
            
            votes
        
            
                
                Accepted
            
        
            
            
        sed: why my regex does not work correctly
                    [^\"] means “any character except \ and "”; so nothing ends up replaced. You’ll get the result you’re after if you remove the backslash from the bracket expression:
sed -e 's/\"\([^&...
                
            
       
        
            
                5
            
            votes
        
            
                
                Accepted
            
        
            
            
        Help w/ "posix-extended" regex for 'find'
                    If you have zsh, you don't need find (and BTW, FreeBSD's find is not old, it's just a different implementation from the GNU one, where extended regexps is just with -E like in grep or sed).
find . -...
                
            
       
        
            
                4
            
            votes
        
        
            
        Help w/ "posix-extended" regex for 'find'
                    Two things:
\s is not supported by GNU find. There are \w and \W for word and non-word, but no \s. See the documentation. Also: Why does my regular expression work in X but not in Y? on why the ...
                
            
       
        
            
                2
            
            votes
        
            
                
                Accepted
            
        
        Where can one find a repository of regex for logcheck?
                    The logcheck downloads page contains a link to logcheck-database, which points to the Debian logcheck-database package page. The package description is the following:
This package brings a database ...
                
            
       
        
            
                1
            
            vote
        
        
            
            
        Perl RegEx one-liner that outputs all matches from one line of STDIN
                    python would be much too verbose as a CLI one-liner
For what it is worth, seeing the complex:er perl in @Stéphane's answer...
# copy & paste the following lines into a shell to try it out
echo '&...
                
            
       
        
            
                1
            
            vote
        
        
            
        Extract email addresses from line, with multiple email addresses per line
                    Using any awk, assuming the input is as simple/regular as in the provided example:
$ awk -F'[<>]' -v OFS=', ' '{for (i=2; i<=NF; i+=2) printf "%s%s", $i, (i<(NF-1) ? OFS : ORS)}' ...
                
            
       
        
            
                1
            
            vote
        
        
            
        Searching for literal strings like '***' using less
                    You are looking for the literal string *** using less.  You could just pipe the file into grep.  Something like this...
$ cat stars.txt
*
**
***
****
text***text
***text***
**should not match**
$ ...
                
            
       
        Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
regular-expression × 2839sed × 902
grep × 735
bash × 445
text-processing × 372
awk × 354
shell-script × 249
linux × 226
shell × 157
find × 143
perl × 140
command-line × 80
vim × 78
rename × 72
wildcards × 71
replace × 59
scripting × 54
string × 53
quoting × 52
files × 46
macos × 46
search × 46
filenames × 29
posix × 28
xml × 26
 
         
         
        