Regular Expression Trouble

Martin McCormick martin at dc.cis.okstate.edu
Mon Dec 12 05:50:08 PST 2005


Parv writes:
>For even finer results, use word boundaries ...
>
>  egrep '\bIN[^[:alnum:]]+A\b' file
>  egrep '\<IN[[:space:]]+A\>'  file

	I sincerely thank all for your examples which I have saved for
future reference.  The word boundary test appears to work perfectly,
but after looking at all the other examples, they should work also
giving living proof that in UNIX, there are many perfectly valid ways
to solve the same problem.  Again, many thanks.

Martin McCormick WB5AGZ  Stillwater, OK 
OSU Information Technology Department Network Operations Group
.-- -... ..... .- --. --..


More information about the freebsd-questions mailing list