sed . regular expressions

commandline session

$ 4.1.5 1 270---> echo "fastest 1000 cars" | sed "s/1000/2000/"
fastest 2000 cars
$ 4.1.5 2 271---> echo "fastest 1000 cars" | sed "s/1*/2000/"
2000fastest 1000 cars
$ 4.1.5 3 272--->
$ 4.1.5 3 272---> echo "fastest 1000 cars" | sed "s/2*/2000/"
2000fastest 1000 cars
$ 4.1.5 4 273---> echo "fastest 1000 cars" | sed "s/'2'/2000/"
fastest 1000 cars
$ 4.1.5 5 274---> echo "fastest 1000 cars" | sed "s/'1'/2000/"
fastest 1000 cars
$ 4.1.5 6 275---> echo "fastest 1000 cars" | sed "s/1/2000/"
fastest 2000000 cars
$ 4.1.5 7 276---> echo "fastest 1000 cars" | sed "s/1?/2000/"
fastest 1000 cars
$ 4.1.5 8 277---> echo "fastest 1000 cars" | sed "s/?1/2000/"
fastest 1000 cars
$ 4.1.5 9 278--->

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s