Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RegEx help pls

0 views
Skip to first unread message

Thief_

unread,
Sep 8, 2005, 8:12:12 PM9/8/05
to
I am trying to find the sentence for which a particular word exists in and
have this expression:

([^>]*>)?country.+?(<|\.)

In this example, I want it to find all sentences with the word "country" in
it. So far, it finds a sentence but from the word "country" to the end of
the sentence, but I can't figure out how to get the characters from the
start of the sentence to the word "country". Can someone pls help me?

Here is my sample data:

<p9>
Frequently Asked Questions (FAQs)
<p10>


<p11>
Flags of the World.
<p12>
Gallery of Covers
<p13>
Text/Low Bandwidth Version
<p14>
<p15>
Download This Publication
<p16>
Submit a Factual Update
<p17>
Search The World Factbook
<p18>
<p19>
What's New
<p20>
- Country information has been updated as of 9 August, 2005.
<p21>
- There have been some significant changes to the latest edition of The
World Factbook.
Recent confirmation that the United Kingdom Government administers the
Sovereign Base
Areas of Akrotiri and Dhekelia on Cyprus as dependencies (and not as lease
areas like
the US Guantanamo Bay Naval Station in Cuba) has required a changing of
their
status and their addition to the Factbook as new entities. In addition, the
European
Union has been included as an "Other" entity at the end of the listing. The
European
Union continues to accrue more nation-like characteristics for itself and so
a separate
listing was deemed appropriate. A fuller explanation may be found under the
European
Union Preliminary statement.
<p22>
- Along with the new entities and the regular information updates, The World
Factbook
now also features six new fields. In the People category, a Major infectious
diseases field
has been added for countries deemed to pose a higher degree of risk for
travelers. In the
Economy category, entries have been added for Current account balance,
Investment
(gross fixed), Public debt, and Reserves of foreign exchange and gold. The
Transnational
issues category has a new Refugees and internally displaced persons entry.
<p23>

--
|
+-- Thief_
|


Cor Ligthert [MVP]

unread,
Sep 9, 2005, 3:31:58 AM9/9/05
to
Thief,

If I understand your problem right, is the most optimal method in VBnet for
this the microsoft.visualbasic.dll 'Find'.

We have discussed this in this newsgroup in a test in october 2003 where I
made a program with some simple tests.

If you want to reread that thread.

http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/d9a3a1e441c5ef92/315c33cc87237dbf#315c33cc87237dbf

I hope this helps,

Cor


0 new messages