473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

unique values out of text area

NEWBIE -

Hello. I've been able to do the following in other languages
(perl,jscript,etc.) but am a asp.net newbie and need some help.

I have this textbox that has a bunch of data in it. At the beginning
of almost every line I have some names followed by a ":" Many (about
3/4) of the names will be duplicates. I'd like to produce a unique
list of names (as they appear) and the count of unique names. So far I
can produce the list of names. In other languages I know how to build
an array that keys it's values by the value itself bucket and
resulting in only unique values. How would I accomplish this task in
VB-asp.net. Many Many thanks!

construct chatter list, remove dups
dim chatters as arraylist
chatters = new arraylist
dim sfor as string
sfor = "^(.+):"
Dim regexp2 as Regex = new Regex (sfor, RegexOptions.IgnoreCase or
RegexOptions.Multiline )
Dim objMatch as Match
For Each objMatch in regexp2.Matches(chat.text)
xcntt = xcntt + 1
Next
Nov 18 '05 #1
1 1278
ja***@cyberpine.com wrote in message news:<ef**************************@posting.google. com>...
NEWBIE -

Hello. I've been able to do the following in other languages
(perl,jscript,etc.) but am a asp.net newbie and need some help.

I have this textbox that has a bunch of data in it. At the beginning
of almost every line I have some names followed by a ":" Many (about
3/4) of the names will be duplicates. I'd like to produce a unique
list of names (as they appear) and the count of unique names. So far I
can produce the list of names. In other languages I know how to build
an array that keys it's values by the value itself bucket and
resulting in only unique values. How would I accomplish this task in
VB-asp.net. Many Many thanks!

construct chatter list, remove dups
dim chatters as arraylist
chatters = new arraylist
dim sfor as string
sfor = "^.*(W+):"
Dim regexp2 as Regex = new Regex (sfor, RegexOptions.IgnoreCase or
RegexOptions.Multiline )
Dim objMatch as Match
For Each objMatch in regexp2.Matches(chat.text)
xcntt = xcntt + 1
Next

ACTUALLY, THE ABOVE (MODIFIED) CODE IS NOT EVEN WORKING AT LOADING THE
ARRAY. THE REGEX IS NOT PULLING THE USERS FROM THE TEXT FIELD. HERE'S
A SAMPLE OF THE DATA (WHICH HAS HTML IN IT). I THINK MY PROBLEM IS
FINDING BEGINNING AND END OF LINE WITH LF OR CCTL..

<br><font color=red>sss: hello
<br><font color=brown>jessica: lol
<br><font color=red>sss: ddd
<br><font color=brown>jessica: who else is in here?
<br><font color=red>sss: ddd
<br><font color=brown>jessica: funny you say that
<br><font color=blue>robert: true

IN THE ABOVE THE DESIRED OUTPUT WOULD BE:

sss
jessica
robert

ARRAY COUNT=3
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark Fisher | last post by:
Hi I have a database on a website, and a table in this db contains two fields, PCode, and Verified. I have to add new records to this in batches, and these batches are generated on a local PC....
8
by: nescio | last post by:
hello, i have an array and i don't know the content of it, but i want only unique values. in php there is a function to do this, but how must i do this in javascript? i have tried a lot and...
11
by: sqlservernewbie | last post by:
Hi Everyone, Here is a theoretical, and definition question for you. In databases, we have: Relation a table with columns and rows
7
by: pushpinderbagga | last post by:
hi .. I am using a text area to feed in values to mysql .. but its not storing all the line breaks the text comes concatenated even when I feed it about 40 lines... it shows all in one line ......
2
by: pradeeps | last post by:
i have array with values.i want to insert this array into text area one per line.up to now my code is............ my @res=; my $tx->insert('end', @res); text area display this result in same...
4
by: Badboy112 | last post by:
Hi guys i have used a data file like you guys have asked me to but im not entirely sure how to use the DataInputStream What i would like to do for this assigment is import the text from the data...
1
by: bytenut | last post by:
I would like to display two field values in a combo after selecting from the list items... i.e. my drop-down shows two fields from a lookup, but when I select the item, only the first field value is...
3
by: ismailc | last post by:
Good day, I need to display values like a small report in a Text Area. But the normal Text Area does not allow to let it look like a report/alingnin etc. Is there a free tool textarea or...
3
by: ismailc | last post by:
Good day, I hope i don't get in trouble as i posted in HTML/CSS as well. I'm not to sure if Javascript could help. I need to show values like a small report in a textarea but text area does not...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.