473,394 Members | 1,750 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,394 software developers and data experts.

using a regex to read this file ??

Ron
I want to read in a text file, I have never done this, and then I want
to use a regular expression, because I think it would be easiest, to
go through that file line by line and pick out all the part numbers,
all of our part numbers start with AU- so what I would like to do is
read in c:\masterparts.txt and what I would really like to do is
display the whole text file in a label on the form making all text
GREY except for the part numbers, those would be highlighted in blue
or something, or if not that just display all the AU- found and the
number of times found. Can anyone help me with how to do this? thanks

Mar 19 '07 #1
0 794

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

Similar topics

8
by: John Hunter | last post by:
In trying to sdebug why a certain regex wasn't working like I expected it to, I came across this strange (to me) behavior. The file I am trying to match definitely contains many instances of the...
1
by: Shmulik | last post by:
How can I (can I?) use a regular expression as the filter to a FileSystemWatcher? I want to watch for something like this: Regex regex = new Regex(@"^Current(One|Two|Three)File\.txt$",...
3
by: Frank Ashley | last post by:
I want to regex a 600Mb file. Instead of reading it all into a string and passing that into an expression is it possible to point regex to a file for proccesing? Thanks Frank
8
by: Vai2000 | last post by:
Hi All, I have a file which has some lines starting with value 50. xxx xxx 50 vvvv 50 I have a solution by which I read line and filter the ones which I want... Is there a way I can get it...
5
by: Just Me | last post by:
Using streams how do I write and then read a set of variables? For example, suppose I want to write into a text file: string1,string2,string3 Then read them later. Suppose I want to write...
10
by: igor.kulkin | last post by:
I have a small utility program written in Python which works pretty slow so I've decided to implement it in C. I did some benchmarking of Python's code performance. One of the parts of the program...
1
by: TtfnJohn | last post by:
I have two small scripts that while on the surface should both work the problem is they don't. Here's the first one: import re testString = 'Thap,fpvi,*!wtyd@*.dip.t-dialin.net:*!ylx@*.dip.t-...
3
by: neino | last post by:
Hello, did anyone of You have problems using boost::regex ? That code below : #include "boost/regex.hpp" /*1*/ int main() /*2*/ { /*3*/...
13
by: brad | last post by:
Still learning C++. I'm writing some regex using boost. It works great. Only thing is... this code seems slow to me compared to equivelent Perl and Python. I'm sure I'm doing something incorrect....
2
by: daveftl | last post by:
Hello, i've tried to extract certain data using Regex in a File. but it seems not working.No errors and warnings have been found. here is my code: Private Sub extractTxt(ByVal inputFile As...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.