sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
* Re: First character of selected space
@ 1994-05-19 14:18 hc05
  0 siblings, 0 replies; 3+ messages in thread
From: hc05 @ 1994-05-19 14:18 UTC (permalink / raw)
  To: Sam mailing list

Forwarded message:
>the trick here is knowing about +#0 and -#0, which go to the
>end of the address.  (-0 and +0 go to the end of the line).
>
>,x/[A-ZA-Z0-9]+/ -#0,+#1 | tr A-Z A-Z

I tried this but did not get good results.  I found that the whole word
was being capitalized, not just the first letter.  Am I missing
something?

Beirne

-- 
-------------------------------------------------------------------------------
Beirne Konarski                 | Reading maketh a full man, conference a
beirnek@summitis.com            | ready man, and writing an exact man.
"Untouched by Scandal"          |       -- Francis Bacon
-------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: First character of selected space
  1994-05-18 15:43 hc05
@ 1994-05-18 17:42 ` hc05
  0 siblings, 0 replies; 3+ messages in thread
From: hc05 @ 1994-05-18 17:42 UTC (permalink / raw)
  To: Sam mailing list

Boy, there's nothing like reading your own mail!  The example should show 

id1, xl2,
rs4, a

becoming

Id1, Xl2,
Rs4, A

rather than the meaningless set of values I used.

Sorry and Thanks,

Beirne

-- 
-------------------------------------------------------------------------------
Beirne Konarski                 | Reading maketh a full man, conference a
beirnek@summitis.com            | ready man, and writing an exact man.
"Untouched by Scandal"          |       -- Francis Bacon
-------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 3+ messages in thread

* First character of selected space
@ 1994-05-18 15:43 hc05
  1994-05-18 17:42 ` hc05
  0 siblings, 1 reply; 3+ messages in thread
From: hc05 @ 1994-05-18 15:43 UTC (permalink / raw)
  To: Sam mailing list

I have a set of C identifiers for which I would like to make the first
letter capital, through a pipe to tr.  The problem is selecting the
first character from the currently selected text, so I can pipe on it.
As an example, I want to take

id1, xl2,
rs4, a

and turn them into 

Id1, Il2,
Is4, A


Is there a way to select the first character of each identifier so I
can pipe it to tr "[a-z]" "[A-Z]"?

Thanks,

Beirne


-- 
-------------------------------------------------------------------------------
Beirne Konarski                 | Reading maketh a full man, conference a
beirnek@summitis.com            | ready man, and writing an exact man.
"Untouched by Scandal"          |       -- Francis Bacon
-------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1994-05-19 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-05-19 14:18 First character of selected space hc05
  -- strict thread matches above, loose matches on Subject: below --
1994-05-18 15:43 hc05
1994-05-18 17:42 ` hc05

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).