Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Substring/Sed/substring.sed
Normal file
11
Task/Substring/Sed/substring.sed
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# 2 chars starting from 3rd
|
||||
$ echo string | sed -r 's/.{3}(.{2}).*/\1/'
|
||||
in
|
||||
# remove first 3 chars
|
||||
echo string | sed -r 's/^.{3}//'
|
||||
# delete last char
|
||||
$ echo string | sed -r 's/.$//'
|
||||
strin
|
||||
# `r' with two following chars
|
||||
$ echo string | sed -r 's/.*(r.{2}).*/\1/'
|
||||
rin
|
||||
Loading…
Add table
Add a link
Reference in a new issue