String Manipulation

Q

questionmarc420

hi,
ivebeen pulling my hair our on this for a while now. I receive a string
called data body.

it comes like the code below.
however when i display it on an html page. the spacign is gone.

////format paragraphs
data_body = data_body.replaceAll("\n ","<br><br>");
data_body = data_body.replaceAll("\n\n","<br><br>");
data_body = data_body.replaceAll("\t","<br><br>");
data_body = data_body.replaceAll("<br><br><br>","<br>");

this is the code i used to try an format it placing it in paragraph
form. now i don't think my code here is very good or strong.
suggestions owuld be nice but that is not hte question im asking.

if u notice hte financial sheets, i need to surround these in a <pre>
tags. and i don't know how to go about this. because i can't find
anythign indicating the start of the sheet.. for me to replace or add a
<pre> tag and close it as well.

if anyone has any ideas please post
thanks
-morc

CHINO, Calif., Jan. 23, 2006 (PRIMEZONE) -- The Board of Directors of Chino
Commercial Bank, N.A. (OTCBB:CKNA) announced the results of operations
for the
year ended December 31, 2005 with net income of $885,173, a 52.3%
increase over
net income of $581,381 for December 31, 2004. Net income per share for
the year
ended December 31, 2005 was $1.08 per share as compared to $0.71 per
share for
the year ended December 31, 2004. Net income per fully diluted share
was $1.00
and $0.66 for the years ended December 31, 2005 and 2004, respectively.

Net income for the fourth quarter ended December 31, 2005 was $268,666
or $0.30
per diluted share, a 57.9% increase compared to $170,185 or $0.19 per
diluted
share for the fourth quarter of 2004.

Dann H. Bowman, President and Chief Executive Officer stated, "We are
very
pleased with the continued growth and profitability of the Bank as we
complete
our fifth full year end. Net earnings represent a return on beginning
equity of
15.0% and a return of average assets of 1.05%. Deposit and Loan
balances
increased this year by 18.8% and 21.5%, respectively, allowing the Bank
to show
improved stability of earnings and efficiency. Along with this growth,
at fiscal
year end the Bank reported no loan delinquencies and no loan losses for
the
entire year."

Financial Condition

At December 31, 2005, total assets were $91.3 million, an increase of
$14.2
million or 18.5% from December 31, 2004.

Total loans increased to $41.8 million at December 31, 2005 from $34.4
million
at December 31, 2004 or an increase of 21.5%. The growth was primarily
in real
estate secured lending.

Total deposits increased by 18.8% to $84.0 million at December 31, 2005
from
$70.7 million at December 31, 2004. Non-interest bearing deposits
increased by
$6.5 million or 11.6% since December 31, 2004, and at year end
represented 74.5%
of total deposits.

Chino Commercial Bank's risk-based capital ratios were 12.14% for Tier
1
capital, 13.20% for Risk-based capital and 7.54% for Leverage capital
on
December 31, 2005.

Earnings

The Bank posted net interest income of $4,001,071 for the year ended
December
31, 2005 as compared to $2,914,252 for the year ended December 31,
2004. Average
interest-earning assets were $78.0 million with average
interest-bearing
liabilities of $18.2 million yielding a net interest margin of 5.13%
for the
year ended December 31, 2005 as compared to average interest-bearing
assets of
$65.0 million with average interest-bearing liabilities of $13.7
million
yielding a net interest margin of 4.48% for the year ended December 31,
2004.
The 65 basis points increase in the net interest margin was the result
of the
higher average balances as the Bank continues to grow and the effect of
upward
repricing of the benchmark for Federal funds.

The Bank posted net interest income of $1,103,311 for the three months
ended
December 31, 2005 as compared to $816,772 for the three months ended
December
31, 2004. Average interest-earning assets were $82.9 million with
average
interest-bearing liabilities of $21.6 million yielding a net interest
margin of
5.32% for the fourth quarter of 2005 as compared to average
interest-bearing
assets of $70.1 million with average interest-bearing liabilities of
$14.7
million yielding a net interest margin of 4.66% for the three months
ended
December 31, 2004.

Non-interest income totaled $553,272 or a decrease of 0.8% from
$557,509 earned
during the year ended December 31, 2004. Service charges on deposit
accounts
increased 7.5% to $461,678 due to higher volume of deposit accounts.
Income from
Mortgage Banking decreased by 73.3% to $17,697 due to reduced activity
in the
refinance market. Income from bank owned life insurance increased by
7.9% to
$64,421 as the Bank purchased policies totaling $1.3 million at the end
of
January 2004.

Non-interest income totaled $134,745 or an 8.3% decline from the fourth
quarter
of 2004. Service charges on deposit accounts decreased 4.6% to $115,002
due to
the lower volume of overdraft and return item charges. There was no
income from
Mortgage Banking during the fourth quarter of 2005 as compared to
$12,273 in the
fourth quarter 0f 2004.

General and administrative expenses were $753,250 for the three months
ended
December 31, 2005 as compared to $642,636 for the three months ended
December
31, 2004. General and administrative expenses were $2,965,458 for the
year ended
December 31, 2005 as compared to $2,476,404 for the year ended December
31,
2004. The largest component of general and administrative expenses was
salary
and benefits expense of $385,900 for the three months ended December
31, 2005 as
compared to $326,003 for the three months ended December 31, 2004.
Salary and
benefits expense were $1,451,897 for the year ended December 31, 2005
as
compared to $1,234,509 for the year ended December 31, 2004. The
increase in
Salary and benefits expenses are reflective of the staff and salary
increases,
incentive compensation and the increase in retirement plan accruals.
Other
components of general and administrative expenses that affected the
increase
were Advertising and Marketing expenses which increased by $20,049 for
the
comparable three month period and increased by $50,305 for the
comparable twelve
month period due primarily to various marketing campaigns. Other
expenses
increased by $17,938 for the comparable three month period and
increased by
$175,525 for the comparable twelve month period due primarily to
courier costs
and client service charges that were affected by an increase in escrow
deposits.

Income tax expense was $173,640 for the three months ended December 31,
2005 as
compared to $102,749 for the three months ended December 31, 2004.
Income tax
expenses were $566,619 for the year ended December 31, 2005 as compared
to
$336,328 for the year ended December 31, 2004. The effective income tax
rate
increased from approximately 37% for the year ended 2004 to 39% for the
year
ended 2005 as various tax credits expired during the year in 2004.

The foregoing contains forward-looking statements within the meaning of
the
Private Securities Litigation Reform Act of 1995. Such statements are
not
historical facts and include expressions about the Bank's plans,
objectives,
management's expectations, intentions, relationships, opportunities,
and
technology and market condition statements. When used in these
presentations,
the words "expects," "anticipates," "intends," "plans," "believes,"
"seeks,"
"estimates," or words of similar meaning, or future or conditional
verbs, such
as "will," "would," "should," "could," or "may" are generally intended
to
identify forward-looking statements. These forward-looking statements
are
inherently subject to significant business, economic and competitive
uncertainties and contingencies, many of which are beyond the Bank's
control. In
addition, these forward-looking statements are subject to assumptions
with
respect to future business strategies and decisions that are subject to
change.
Actual results may differ materially from the results discussed in
these
forward-looking statements for the reasons, among others, discussed in
Bank's
Annual Report on Form 10-KSB for the year ended December 31, 2005,
which
include: changes in general business and economic conditions may
significantly
affect the Bank's earnings; changes in level of market interest rates;
changes
in credit risks of lending activities and competitive factors;
effective income
tax rates, relationships with major customers, extent and timing of
legislative
and regulatory actions and reforms. The Bank is not obligated to update
and does
not undertake to update any of its forward-looking statements made
herein.



CHINO COMMERCIAL BANK
STATEMENT OF FINANCIAL CONDITION

December 31,
2005 2004
----------- -----------
(unaudited)
ASSETS:

Cash and due from banks $ 5,328,842 $ 2,374,688
Federal Funds sold 11,370,000 10,925,000
----------- -----------
Cash and cash equivalents 16,698,842 13,299,688

Interest-bearing deposits at banks 6,030,000 6,271,000
Investment Securities available for sale 16,311,377 15,562,826

Investment Securities held to maturity
(fair value approximates $5,764,134 at
December 31, 2005 and $4,859,395 at
December 31, 2004) 5,850,687 4,801,024
Federal Reserve Bank stock, at cost 159,600 159,600
Federal Home Loan Bank stock, at cost 362,600 283,500
Pacific Coast Bankers' Bank stock,
at cost 50,000 50,000
Loans
Construction 2,790,712 3,520,772
Real estate 30,444,344 23,886,582
Commercial 8,295,573 6,534,464
Installment 633,504 635,609
Farm/Agriculture 330,920 346,261
Unearned fees, net (144,106) (119,328)
Allowance for loan losses (544,140) (407,046)
----------- -----------
Loans, net 41,806,807 34,397,314
----------- -----------
Fixed assets, net 1,936,168 389,965

Accrued interest receivable 314,849 258,528
Prepaid &amp; other assets 1,811,979
1,612,617
----------- -----------
Total Assets $91,332,909 $77,086,062
=========== ===========

LIABILITIES:

Deposits
Non-interest bearing $62,610,963 $56,112,375
Interest bearing
Money market &amp; NOW 16,793,824
10,231,507
Savings 913,249 926,275
Time deposits of $100,000 or
greater, due in one year 2,216,104 1,802,181
Time deposits less than
$100,000, due in one year 1,487,803 1,668,794
----------- -----------
Total Deposits 84,021,943 70,741,132
----------- -----------

Accrued interest payable 28,858 20,642
Accrued expenses &amp; other payables 588,068
422,994
----------- -----------
Total Liabilities 84,638,869 71,184,768
----------- -----------

STOCKHOLDERS' EQUITY
Common Stock, authorized 10,000,000
shares with a par value of $3.33 per
share; issued and outstanding
818,453 at December 31, 2005 and
December 31, 2004, respectively 2,728,230 2,728,230
Additional paid-in capital 2,590,600 2,590,600
Accumulated earnings 1,497,818 612,645
Accumulated other comprehensive income (122,608) (30,181)
----------- -----------
Total Stockholders' Equity 6,694,040 5,901,294
----------- -----------
Total Liabilities &amp; Equity $91,332,909
$77,086,062
=========== ===========

CHINO COMMERCIAL BANK
STATEMENTS OF OPERATIONS

For the For the
Three months ending Year ending
December 31, December 31,
--------------------- ---------------------
2005 2004 2005 2004
--------- --------- --------- ---------
(unaudited) (unaudited)
Interest Income
Interest Income
- Securities $ 277,341 $ 233,873 $ 985,773 $ 777,001
Interest Income
- Fed Funds 123,700 43,746 386,707 138,011
Interest and fee income
on Loans 781,875 587,188 2,888,186 2,170,806
--------- --------- --------- ---------
Total Interest
Income 1,182,916 864,807 4,260,666 3,085,818
---------- --------- --------- ---------
Interest Expense
Interest Expense
- Deposits 79,605 48,035 259,595 171,566
--------- --------- --------- ---------
Total Interest
Expense 79,605 48,035 259,595 171,566
--------- --------- --------- ---------
Total net interest
income 1,103,311 816,772 4,001,071 2,914,252
--------- --------- --------- ---------
Provision for loan
losses 42,500 48,094 137,093 77,648
--------- --------- --------- ---------
Total net interest
income after
provision for loan
losses 1,060,811 768,678 3,863,978 2,836,604
--------- --------- --------- ---------
Non-interest income
Service Charges on
Deposit Accounts 115,002 120,601 461,678 429,622
Other miscellaneous
fee income 3,309 (2,295) 9,476 1,993
Income from Mortgage
Banking -- 12,273 17,697 66,207
Income from Bank owned
life insurance 16,434 16,313 64,421 59,687
--------- --------- --------- ---------
Total Non-interest
income 134,745 146,892 553,272 557,509
--------- --------- --------- ---------
General &amp; Administrative
Expenses
Salaries &amp; Benefits 385,900 326,003 1,451,897
1,234,509
Occupancy &amp; Equipment 69,245 65,979 263,418
254,320
Data &amp; Item Processing 60,881 47,536 223,603
191,533
Advertising &amp; Marketing 34,154 14,105 127,944
77,639
Audit &amp; Professional
fees 30,895 38,558 163,546 172,185
Insurance 6,197 6,012 24,198 23,106
Directors' fees and
expenses 21,187 17,590 78,249 66,034
Other expenses 144,791 126,853 632,603 457,078
--------- --------- --------- ---------
Total general &amp;
administrative
expenses 753,250 642,636 2,965,458 2,476,404
--------- --------- --------- ---------

Income before income
tax expense 442,306 272,934 1,451,792 917,709
Income tax expense 173,640 102,749 566,619 336,328
--------- --------- --------- ---------
Net income $ 268,666 $ 170,185 $ 885,173 $ 581,381
========= ========= ========= =========
Basic Earnings
per share $ 0.33 $ 0.21 $ 1.08 $ 0.71
========= ========= ========= =========
Diluted Earnings
per share $ 0.30 $ 0.19 $ 1.00 $ 0.66
========= ========= ========= =========

CHINO COMMERCIAL BANK
Selected Financial Highlights

For the For the
Three months ended Year ended
December 31, December 31,
-------------------- --------------------
2005 2004 2005 2004
---------- -------- --------- ---------
Selected Operating Data:
Net interest income $1,103,311 816,772 4,001,071 2,914,252
Provision for loan
losses 42,500 48,094 137,093 77,648
Non-interest income 134,745 146,892 553,272 557,509
Non-interest expense 753,250 642,636 2,965,458 2,476,404
Net income $ 268,666 170,185 885,173 581,381
Share Data:
Basic income per share $ 0.33 0.19 1.08 0.71
Diluted Income per share $ 0.30 0.18 1.00 0.66
Weighted average common
shares outstanding
Basic 818,453 818,453 818,453 818,453
Diluted 884,444 883,672 884,212 881,338

Performance Ratios:
Return on average assets 1.19% 0.89% 1.05% 0.82%
Return on average equity 16.27% 11.54% 14.03% 10.26%
Equity to total assets
at the end of the period 7.33% 7.66% 7.33% 7.66%
Net interest spread 4.24% 3.64% 4.04% 3.49%
Net interest margin 5.32% 4.66% 5.13% 4.48%
Average interest-earning
assets to average-
bearing liabilities 384.62% 477.83% 428.44% 473.56%
Core efficiency ratio 60.82% 66.70% 65.11% 71.31%
Non-interest expense to
average assets 3.34% 3.37% 3.51% 3.50%


Selected Balance Sheet Data: 12/31/2005 12/31/2004

Total assets $91,332,909 77,086,062
Investment securities held to maturity 5,850,687 4,801,024
Investment securities available for sale 16,311,377 15,562,826
Loan receivable, net 41,806,807 34,397,314
Deposits 84,021,943 70,741,132
Non-interest bearing deposits 62,610,963 56,112,375
Stockholders' equity $ 6,694,040 5,901,294

Regulatory capital ratios:

Average equity to average assets 7.46% 8.00%
Leverage capital 7.54% 8.36%
Tier I risk based 12.14% 13.80%
Risk-based capital 13.21% 14.81%

Asset Quality Ratios:
Allowance for loan losses as a percent
of gross loans receivable 1.28% 1.17%
Net charge-offs to average loans n/a n/a
Non-performing loans to total loans n/a n/a

Number of full-service customer facilities 1 1

CONTACT: Chino Commercial Bank, N.A.
Dann H. Bowman, President and CEO
Jo Anne Painter, Executive Vice President and CFO
(909) 393-8880

</string>
 
O

Oliver Wong

hi,
ivebeen pulling my hair our on this for a while now. I receive a string
called data body.

it comes like the code below.
however when i display it on an html page. the spacign is gone.

////format paragraphs
data_body = data_body.replaceAll("\n ","<br><br>");
data_body = data_body.replaceAll("\n\n","<br><br>");
data_body = data_body.replaceAll("\t","<br><br>");
data_body = data_body.replaceAll("<br><br><br>","<br>");

this is the code i used to try an format it placing it in paragraph
form. now i don't think my code here is very good or strong.
suggestions owuld be nice but that is not hte question im asking.

if u notice hte financial sheets, i need to surround these in a <pre>
tags. and i don't know how to go about this. because i can't find
anythign indicating the start of the sheet.. for me to replace or add a
<pre> tag and close it as well.

if anyone has any ideas please post
thanks
-morc

<string> [long example string snipped]
</string>

You could just surround the entire string with <pre> and </pre>, and
forget about all your calls to replaceAll().

data_body = "<pre>" + data_body + "</pre>";

- Oliver
 
Q

questionmarc420

i'd like to but unforutnaly i need the text to go the full length of
the page when minimized or maximized. in doing what us uggested it
would always be the same minimized or maximized.
 
O

Oliver Wong

i'd like to but unforutnaly i need the text to go the full length of
the page when minimized or maximized. in doing what us uggested it
would always be the same minimized or maximized.

Your code, which looks like:

data_body = data_body.replaceAll("\n ","<br><br>");

will also prevent the text from spanning the entire width of the page.

- Oliver
 
Q

questionmarc420

two wrongs don't make a right.
please don't post unless it has something to do wiht original post
 
L

Luc The Perverse

two wrongs don't make a right.
please don't post unless it has something to do wiht original post

Yes - lets talk about acceptable usenet behavior for a second please.

1. Using proper grammer/spelling helps everyone to understand your
point/makes you look less dumb (the latter point should be of particular
interest to you)
2. Please quote who and what you are replying to - this way people will know
what you are talking about, without having to backtrack. Proper quoting
greatly reduces your chances of being plonked (blocked) by the people who
want to help you.
3. Please stop being a dick. This is a forum of people - if you need
slaves, consider hiring out people in a 3rd world country. You are not the
king of the thread, NG, etc - and if people with an established reputation
want the thread to drift then that's their prerogative.
4. Notice your hypocrisy in posting an off topic post in the thread.
5. Please consider the conversation - you said "You are wrong wrong wrong"
or something similar with an incrediblely dense collection of english
mistakes as your posts normally contain. You were kindly asked, by someone
who probably had a genuine interest to help, to explain how this person was
wrong - and what the right answer is since you obviously know it.

You started getting on my bad side with the "no. youre wrong wong"
gibberish. A perfectly acceptable reply would have had an attribution,
quote and then stated that you tried this, listed your result and explained
the deviation from your expectation. You obviously want the thread to stay
on topic, but your trollish tendencies seem to be making that difficult.
 
B

Babu Kalakrishnan

Luc said:
Yes - lets talk about acceptable usenet behavior for a second please.

Hmm....

3. Please stop being a dick. This is a forum of people - if you need
slaves, consider hiring out people in a 3rd world country.

And I suppose a remark that terms people from "third world countries" as
"slaves" is very PROPER usenet behaviour ..

Ever heard something on the lines "Pot.. kettle.. black..." ?

BK
 
R

Roedy Green

Don't be silly. The best you can hope for is tenuous relevant to post
quted. Topic drift is inevitable.
 
L

Luc The Perverse

Babu Kalakrishnan said:
Hmm....



And I suppose a remark that terms people from "third world countries" as
"slaves" is very PROPER usenet behaviour ..

Ever heard something on the lines "Pot.. kettle.. black..." ?


Sorry - what I meant was that if you offer someone about 3-10 times their
normal wages they will typically be eager to be at your service. It was my
impression that he could not afford to do this with most Java programmers in
a developed country.
 
M

Michael Redlich

Luc said:
Yes - lets talk about acceptable usenet behavior for a second please.
3. Please stop being a dick. This is a forum of people - if you need
slaves, consider hiring out people in a 3rd world country. You are not the
king of the thread, NG, etc - and if people with an established reputation
want the thread to drift then that's their prerogative.

I believe that watching your use of language should be included in your
list, eh??

Talk about hypocrisy...

Mike.
 
L

Luc The Perverse

Michael Redlich said:
I believe that watching your use of language should be included in your
list, eh??

Talk about hypocrisy...


^^

Appearantly I pissed everyone off - sorry about that.

But am I the only one that finds it offensive for someone to march into a
group, post a question and expect everyone in the group to bend over
backwards for them?
 
Q

questionmarc420

no but u might be the only one who thinks i expected anyone to bend
over backwards for me.
 
C

Chris Uppal

Luc said:
But am I the only one that finds it offensive for someone to march into a
group, post a question and expect everyone in the group to bend over
backwards for them?

Not in the least.

But for me (e-mail address removed) is just another Google-powered looser. They
proliferate like malaria parasites and have about as much willingness to learn
the norms of the communities they are invading[*], or even just to behave with
ordinary courtesy.

There are too many of them, and there is nothing to be done but ignore them or
give up Usenet altogether.

-- chris

[*] There are some important exceptions, of course.
 
L

Luc The Perverse

no but u might be the only one who thinks i expected anyone to bend
over backwards for me.

no you are wrong wrong - and two wrongs don't make a right - so I suppose it
would just be better if everyone would focus their efforts on answering the
original question.
 
L

Luc The Perverse

Chris Uppal said:
Luc said:
But am I the only one that finds it offensive for someone to march into a
group, post a question and expect everyone in the group to bend over
backwards for them?

Not in the least.

But for me (e-mail address removed) is just another Google-powered looser.
They
proliferate like malaria parasites and have about as much willingness to
learn
the norms of the communities they are invading[*], or even just to behave
with
ordinary courtesy.

There are too many of them, and there is nothing to be done but ignore
them or
give up Usenet altogether.

-- chris

[*] There are some important exceptions, of course.

I hadn't thought of it that way - perhaps I should start ignoring, one
killfile at a time!
 
O

Oliver Wong

Luc The Perverse said:
^^

Appearantly I pissed everyone off - sorry about that.

I didn't think you had any malicious intent when you wrote the above, so
it didn't bother me.
But am I the only one that finds it offensive for someone to march into a
group, post a question and expect everyone in the group to bend over
backwards for them?

Maybe you get offended too easily. =) It's an unmoderated newsgroup, so
anyone is free to make posts demanding anything they want, and we are free
to either follow those demands (as I initially tried), or ignore them (as
many others have done), or make posts explaining to that first person that
they shouldn't be so demanding (as you have done), etc.

I was trying to help questionmarc420 out, but it quickly became
apparently that I was giving out bad or incorrect advice, so I figured I'd
better shut up and not cause any more harm, right? ;)

questionmarc420 asked (told?) people not to reply to this thread unless
it had some relevance to the original topic. I obeyed this request for a
while and didn't post anything new, but now I've changed my mind and replied
to the thread in the form of the post you are reading right now. And this
post doesn't have much to do with the original post of this thread.

On the chance that questionmarc420 doesn't get satisfactory help to
his/her initial problem and can't figure out why, (s)he may be interested in
reading this:

http://mindprod.com/jgloss/newsgroups.html#GIFTHORSE

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top