473,508 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Regex File contents

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
Jul 21 '05 #1
3 1233
Nopes I think.

IMHO, the Regex will need full string. Otherwise, it'd be impossible to
manage back-references or otherwise...
--
Cheers,
Gaurav Vaish
http://mastergaurav.org
http://mastergaurav.blogspot.com
---------------------

Jul 21 '05 #2
True. But I was hoping there was some kind file/memory trickery that regex
might use.
regards
Frank


"MasterGaurav" <ga**********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Nopes I think.

IMHO, the Regex will need full string. Otherwise, it'd be impossible to
manage back-references or otherwise...
--
Cheers,
Gaurav Vaish
http://mastergaurav.org
http://mastergaurav.blogspot.com
---------------------

Jul 21 '05 #3
Frank Ashley wrote:
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?


Not directly. But - assuming that the file contains multiple matches -
you can read it in a chunk at a time until you have a match; process
all matches in the read buffer; then read again until the next match.
Not the most trivial code, but nothing that will cause hair loss.

--

www.midnightbeach.com
Jul 21 '05 #4

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

Similar topics

5
5172
by: Markus Ernst | last post by:
Hello I have a regex problem, spent about 7 hours on this now, but I don't find the answer in the manual and googling, though I think this must have been discussed before. I try to simply...
8
1666
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...
6
396
by: Du Dang | last post by:
Text: ===================== <script1> ***stuff A </script1> ***more stuff <script2> ***stuff B
0
1193
by: delta7 | last post by:
Hi, I'm now nearing the completion of my first c# development. I have two applications. The first is a simple database app that uses an Access database to store Regex strings along with a...
6
1473
by: jodawi | last post by:
I need to find a bunch of C function declarations by searching thousands of source or html files for thousands of known function names. My initial simple approach was to do this: rxAllSupported...
6
318
by: Chris | last post by:
I'm new at using Regex, and I'm using VB.NET. I can't seem to get this to work. I'm replacing matched items in a text file. The format is v (upper or lower) and then 4-5 integers. I'm trying (many...
4
2621
by: Chris | last post by:
Hi Everyone, I am using a regex to check for a string. When all the file contains is my test string the regex returns a match, but when I embed the test string in the middle of a text file a...
3
2364
by: Razvan | last post by:
Hello there, I have the following problem: I have a big html and i want to remove from it everything between some tags and to keep the rest, of course using regex, but any solution will be...
5
1848
by: Gilles Ganault | last post by:
Hello I'm trying to extract information from a web page using the Re module, but it doesn't seem to support MULTILINE: ============= import re #NO CRLF : works response =...
1
2708
by: =?Utf-8?B?QWxCcnVBbg==?= | last post by:
I have a regular expression for capturing all occurrences of words contained between {{ and }} in a file. My problem is I need to capture what is between those symbols. For instance, if I have...
0
7115
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...
1
7036
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
7489
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...
0
5624
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,...
1
5047
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...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.