New answers tagged perl
3
votes
Syntax Error on sed for Regex Subrotines 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).
...
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 '&...
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&...
0
votes
How to make Perl half/full width-insensitive regular expressions?
What is the easy way to write /4|4/ ?
Here's a long one-liner:
perl -COA -lwe "@c=('A'..'C','x'..'z','0'..'9'); $rs = sprintf'[%s%s]', join('',@c), join('',map chr 0xfee0+ord, @c); print $rs; $r ...
Top 50 recent answers are included
Related Tags
perl × 1388awk × 461
sed × 422
text-processing × 345
linux × 177
bash × 157
regular-expression × 140
shell-script × 133
grep × 82
shell × 76
scripting × 66
python × 58
files × 31
rename × 30
debian × 28
centos × 26
command-line × 26
ksh × 24
cpan × 22
solaris × 18
csv × 18
find × 17
rhel × 15
apache-httpd × 15
ssh × 14