Note that there are some explanatory texts on larger screens.

plurals
  1. POmatch string length; find and Replace; remove HTML tags in C++
    primarykey
    data
    text
    <p>here is my question <br> I'm trying to remove HTML tags, simply format them (like new line for every information), and write other program to extract useful information later.<br> I have read the data into a large string array so far.<br> here is my thought: find all tags which is in &lt;> and replace them with blank. after checking online, I saw some programs that can do the find and replacement part. <br> Because different HTML tags have different length, so I'm wondering is there a way in C++ that can detect any length of the tag, as long as it's in the &lt;>. and then just replace them.<br> here is one sample code of HTML</p> <pre><code>&lt;div style="width: 200px;"&gt;&lt;strong&gt;Balance Sheets (USD $)&lt;br&gt;&lt;/strong&gt;&lt;/div&gt; </code></pre> <p>and I hope to get after operations:</p> <pre><code>Balance Sheets (USD $) </code></pre> <p><br> could anyone help? or does anyone have a better idea to deal with this task? Any help is greatly appreciated!<br></p> <pre><code>&lt;DOCUMENT&gt; &lt;TYPE&gt;XML &lt;SEQUENCE&gt;33 &lt;FILENAME&gt;R2.htm &lt;DESCRIPTION&gt;IDEA: XBRL DOCUMENT &lt;TEXT&gt; &lt;html&gt; &lt;head&gt; &lt;META http-equiv="Content-Type" content="text/html; charset=us-ascii"&gt; &lt;link rel="StyleSheet" type="text/css" href="report.css"&gt;&lt;script type="text/javascript" src="Show.js"&gt;/* Do Not Remove This Comment */&lt;/script&gt;&lt;/head&gt; &lt;body&gt;&lt;span style="display: none;"&gt;v2.4.0.6&lt;/span&gt;&lt;table class="report" border="0" cellspacing="2" id="ID0EQAAG"&gt; &lt;tr&gt; &lt;th class="tl" colspan="1" rowspan="1"&gt; &lt;div style="width: 200px;"&gt;&lt;strong&gt;Balance Sheets (USD $)&lt;br&gt;&lt;/strong&gt;&lt;/div&gt; &lt;/th&gt; &lt;th class="th"&gt; &lt;div&gt;Dec. 31, 2012&lt;/div&gt; &lt;/th&gt; &lt;th class="th"&gt; &lt;div&gt;Dec. 31, 2011&lt;/div&gt; &lt;/th&gt; &lt;/tr&gt; &lt;tr class="re"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_tpoi_CurrentAssetsAbstract', window );"&gt;&lt;strong&gt;Current assets:&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt; &lt;td class="text"&gt;&amp;#xA0;&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="text"&gt;&amp;#xA0;&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="ro"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_CashAndCashEquivalentsAtCarryingValue', window );"&gt;Cash and cash equivalents&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;$ 106,999&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;$ 52,109&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="re"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_AccountsReceivableNetCurrent', window );"&gt;Accounts receivable&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;110,720&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;61,218&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="ro"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_tpoi_AccountsReceivableRelatedParty', window );"&gt;Accounts receivable - related party&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;1,527&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="text"&gt;&amp;#xA0;&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="reu"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_AssetsCurrent', window );"&gt;Total current assets&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;219,246&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;113,327&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="ro"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_PropertyPlantAndEquipmentNet', window );"&gt;Property and equipment, net&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;152,724&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;160,454&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="re"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_CapitalizedSoftwareDevelopmentCostsForSoftwareSoldToCustomers', window );"&gt;Capitalized software development costs&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;188,371&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="text"&gt;&amp;#xA0;&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="ro"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_IntangibleAssetsNetExcludingGoodwill', window );"&gt;Intangible assets, net&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;59,151&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;59,151&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="re"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_OtherAssetsCurrent', window );"&gt;Other assets&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;11,622&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;15,470&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="rou"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_NoncurrentAssets', window );"&gt;Total long term assets&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;411,868&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;235,075&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="reu"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_Assets', window );"&gt;Total assets&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;631,114&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;348,402&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="ro"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_tpoi_CurrentLiabilitiesAbstract', window );"&gt;&lt;strong&gt;Current liabilities:&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt; &lt;td class="text"&gt;&amp;#xA0;&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="text"&gt;&amp;#xA0;&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="re"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_AccountsPayableCurrent', window );"&gt;Accounts payable&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;50,866&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;70,253&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="ro"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_AccruedLiabilitiesCurrent', window );"&gt;Accrued liabilities&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;1,452&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;6,752&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="reu"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_Liabilities', window );"&gt;Total current liabilities&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;52,318&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;77,005&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="ro"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_OtherAccruedLiabilitiesNoncurrent', window );"&gt;Other non current liabilities, accrued interest&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;7,500&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;1,500&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="re"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_NotesPayableCurrent', window );"&gt;Notes payable&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;50,000&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;50,000&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="ro"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_DueToRelatedPartiesCurrent', window );"&gt;Notes payable - related party&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;100,000&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;100,000&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="reu"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_OtherLiabilitiesCurrent', window );"&gt;Total long-term liabilities&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;157,500&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;151,500&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="rou"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_LiabilitiesCurrent', window );"&gt;Total liabilities&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;209,818&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;228,505&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="re"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_tpoi_ShareholdersEquityAbstract', window );"&gt;&lt;strong&gt;Shareholders&amp;#x2019; equity:&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt; &lt;td class="text"&gt;&amp;#xA0;&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="text"&gt;&amp;#xA0;&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="ro"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_CommonStockValue', window );"&gt;Common stock, $0 par value, 30,000,000 shares authorized, 13,312,302 and 9,312,302 shares issued and outstanding at December 31, 2012 and 2011, respectively&lt;/a&gt;&lt;/td&gt; &lt;td class="nump"&gt;1,542,651&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="nump"&gt;946,151&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="re"&gt; &lt;td class="pl" style="border-bottom: 0px;" valign="top"&gt;&lt;a class="a" href="javascript:void(0);" onclick="top.Show.showAR( this, 'defref_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment', window );"&gt;Accumulated deficit&lt;/a&gt;&lt;/td&gt; &lt;td class="num"&gt;(1,145,758)&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td class="num"&gt;(837,310)&lt;span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; **Many many HTML code here...... Many Many Many** &lt;td&gt;&lt;strong&gt; Name:&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;nobr&gt;us-gaap_StockholdersEquity&lt;/nobr&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-right: 4px;"&gt;&lt;nobr&gt;&lt;strong&gt; Namespace Prefix:&lt;/strong&gt;&lt;/nobr&gt;&lt;/td&gt; &lt;td&gt;us-gaap_&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt; Data Type:&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;xbrli:monetaryItemType&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt; Balance Type:&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;credit&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt; Period Type:&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;instant&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; &lt;/TEXT&gt; &lt;/DOCUMENT&gt; </code></pre> <p>the code is like this but way longer</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload