Question : I want to clean up an awk command

I use the following commands to replace one string with another-
 awk '{sub(/SELECT/,"SEL");print}'

I also use it a second time for differences with lower case letters
 awk '{sub(/Select/,"SEL");print}'

And a third time
 awk '{sub(/select/,"SEL");print}'

Not exactly neat and tidy...

Is there a way to make it ignore case on the search string? Or can I use something along the lines of "SELECT or Select or select" in the search string?

Thanks!

Answer : I want to clean up an awk command

awk '{sub(/[Ss](elect|ELECT)/,"SEL");print}'
Random Solutions  
 
programming4us programming4us