Skip to content
Prev 259880 / 398502 Next

Find String Between Characters

Hi Jim,

Thanks for your note.

Unfortunately, when I attempt your solution in my exact setting, I get a
weird and slightly different answer.

First, let me be more clear.  What I am attempting to do is pull the CIK
number out of the information from the web page itself after it has loaded
to R (this may not be optimal, but I am new at this), not from the web
page reference (as you have done).

So, when I execute the following as per your suggestion:

require(scrapeR)
mmm<-scrape(url="http://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=0000320193&owner=exclude&count=40")

num <- sub("^.*CIK=([0-9]+).*", "\\1", mmm)

I get
[1] "<pointer: 0x00000000001265c0>"

Is this just a hex representation of the same number, or is something else
going on here?

Comments from any and all would be much appreciated.

--John J. Sparks, Ph.D.
On Sat, May 14, 2011 7:57 pm, jim holtman wrote: