For Programmers: Free Programming Magazines  


Home > Archive > AWK > May 2005 > rexexp in RS









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author rexexp in RS
E. Rosten

2005-05-03, 3:56 pm


Is having regexs in RS supposed to be supported, or is is just a mawk/gawk
extension?

If its the latter, then it's a shame since it's one of the most useful
things ever.

-Ed

--
(You can't go wrong with psycho-rats.) (er258)(@)(eng.cam)(.ac.uk)

/d{def}def/f{/Times findfont s scalefont setfont}d/s{10}d/r{roll}d f 5/m
{moveto}d -1 r 230 350 m 0 1 179{1 index show 88 rotate 4 mul 0 rmoveto}
for /s 15 d f pop 240 420 m 0 1 3 { 4 2 1 r sub -1 r show } for showpage

Ed Morton

2005-05-03, 3:56 pm



E. Rosten wrote:

> Is having regexs in RS supposed to be supported, or is is just a mawk/gawk
> extension?
>
> If its the latter, then it's a shame since it's one of the most useful
> things ever.
>
> -Ed
>


It's a gawk extension, see:

> The use of RS as a regular expression and the RT variable are gawk extensions; they are not available in compatibility mode (see Options). In compatibility mode, only the first character of the value of RS is used to determine the end of the record.


from
http://www.gnu.org/software/gawk/ma...-separators-366

Ed.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com