結果の文字列
何がしたいことは右、あなたがあなた自身のアプリでテキストを折り返すことができたり、
がhttp://www.regexformat.comアプリ
文書にグループ1の文字列を貼り付けキャプチャグループに1
ある
1A\s*\.\s*RISK\s+FACTORS(.*?)1B\s*\.\s*UNRESOLVED\s+STAFF\s+COMMENTS
コンテキストメニュー - >その他のユーティリティ - >ワードラップをクリックします。
最大行の長さに約60の値を入力します。
そして、以下のように(これは切り捨てられています)、5kのラップされたテキストがポップアウトされます。
The risks described below could materially and adversely
affect our business, results of operations, financial
condition and liquidity. Our business operations could also
be affected by additional factors that apply to all
companies operating in the U.S. and globally.Strategic
RisksGeneral or macro-economic factors, both domestically
and internationally, may materially adversely affect our
financial performance.General economic conditions, globally
or in one or more of the markets we serve, may adversely
affect our financial performance. Higher interest rates,
lower or higher prices of petroleum products, including
crude oil, natural gas, gasoline, and diesel fuel, higher
costs for electricity and other energy, weakness in the
housing market, inflation, deflation, increased costs of
essential services, such as medical care and utilities,
higher levels of unemployment, decreases in consumer
disposable income, unavailability of consumer credit, higher
consumer debt levels, changes in consumer spending and
shopping patterns, fluctuations in currency exchange rates,
higher tax rates, imposition of new taxes and surcharges,
other changes in tax laws, other regulatory changes, overall
出典
2017-04-05 22:26:36
sln
正規表現でHTMLを解析しないでください。実際のパーサでCSSセレクタまたはXpathを使用できますか? – jonrsharpe
htmlソースに「Item 1A Risk Factors」や「Item 1B Unresolved」という文字列は含まれていません。 – horcrux
「Item 1A Risk Factors」または「Item 1B Unresolved」は実際のテキストに記載されています。だから私はまずhtmlタグを削除し、正規表現を使用しようとしています。これが理にかなってほしい。 – kevin