The basic syntax is s/// with the slash / being a delimiter between the substitution pattern being sought and the replacement pattern. However, you can use anything. These are all the same:
Code:
ls -1 *py | sed s/.py//
ls -1 *py | sed s|.py||
ls -1 *py | sed s#.py##
ls -1 *py | sed 's!.py!!'
ls -1 *py | sed sa.pyaa
ls -1 *py | sed sb.pybb
# etc
You can do similarly with the regular pattern search // too.
Code:
ls -1 | sed -n -e '/py$/p'
ls -1 | sed -n -e '\|py$|p'
ls -1 | sed -n -e '\#py$#p'
ls -1 | sed -n -e '\!py$!p'
# etc
See "man sed" and scroll down to \cregexpc unde "Addresses"