🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #2248

a smarter strtok(3)?

#2248
From: Sam Steingold
Date: Mon, 27 Nov 1995 07:49
24 lines
1042 bytes
I would like to split a string like

"[\"aaaaa\" \"bbbbb\" () \"ccc[ddd]\" ([\"eee\" ff gg hh ii] [\"jj\" kk lll mmm
nn]) () (\"oooo\")]"

in a sensible way: namely, into strings

\"aaaaa\"
\"bbbbb\"
NULL
\"ccc[ddd]\"
([\"eee\" ff gg hh ii] [\"jj\" kk lll mmm nn])	<---	and apply it
							again to this
NULL
\"oooo\"

It doesn't look like strtok(3) will do the job, and I wonder if I'll
really have to (re?)invent the wheel.

Thanks!
Sam

--
<A HREF="http://www.math.ucla.edu/~shteingd">    Sam Steingold    </A>
Technical Details
Message-ID: <nfu43qbipl.fsf@gauss.math.ucla.edu>
Path: arc1-ca.pugleaf.net!math.ucla.edu!shteingd

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!math.ucla.edu!shteingd
From: shteingd@math.ucla.edu (Sam Steingold)
Newsgroups: gnu.emacs.help,comp.lang.c
Subject: a smarter strtok(3)?
Followup-To: poster
Date: 26 Nov 1995 23:49:26 -0800
Organization: University of California, Los Angeles
Sender: shteingd@gauss.math.ucla.edu
Message-ID: <nfu43qbipl.fsf@gauss.math.ucla.edu>
Reply-To: sds@ucla.edu
NNTP-Posting-Host: gauss.math.ucla.edu
Return-Receipt-To: sds@ucla.edu
X-Disclaimer: You should not expect anyone to agree with me.