473,748 Members | 10,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parse positions in a long string inside text file?

Hello All!
I have a long string that I need to make sense out of. I have the
documentation about what info is between which characters, I just need to
somehow parse each 94 character string into it's own section and from there
be able to identify what info is in positions 8-11 or 12-24 etc...

Any thoughts?

TIA

Luis
Nov 20 '05 #1
4 1269
myString.substr (8, 11)

etc.
"Anon" <an**@anon.co m> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
| Hello All!
| I have a long string that I need to make sense out of. I have the
| documentation about what info is between which characters, I just need to
| somehow parse each 94 character string into it's own section and from
there
| be able to identify what info is in positions 8-11 or 12-24 etc...
|
| Any thoughts?
|
| TIA
|
| Luis
|
|
Nov 20 '05 #2
I think the mystring.substr ing will may work...
let me give it a shot!

Thanks!

Luis

"steve" <a@b.com> wrote in message
news:10******** *****@corp.supe rnews.com...
myString.substr (8, 11)

etc.
"Anon" <an**@anon.co m> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
| Hello All!
| I have a long string that I need to make sense out of. I have the
| documentation about what info is between which characters, I just need to | somehow parse each 94 character string into it's own section and from
there
| be able to identify what info is in positions 8-11 or 12-24 etc...
|
| Any thoughts?
|
| TIA
|
| Luis
|
|

Nov 20 '05 #3
Now any idea how to write text into a position or positions. for instance, I
want to input acct info into positions 1 - 13 and only those positions! any
thoughts?

TIA, you guys/gals are great help!

Luis
"Anon" <an**@anon.co m> wrote in message
news:eo******** ******@TK2MSFTN GP10.phx.gbl...
I think the mystring.substr ing will may work...
let me give it a shot!

Thanks!

Luis

"steve" <a@b.com> wrote in message
news:10******** *****@corp.supe rnews.com...
myString.substr (8, 11)

etc.
"Anon" <an**@anon.co m> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
| Hello All!
| I have a long string that I need to make sense out of. I have the
| documentation about what info is between which characters, I just need

to
| somehow parse each 94 character string into it's own section and from
there
| be able to identify what info is in positions 8-11 or 12-24 etc...
|
| Any thoughts?
|
| TIA
|
| Luis
|
|


Nov 20 '05 #4
ditto.
Nov 20 '05 #5

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

Similar topics

22
872
by: Ram Laxman | last post by:
Hi all, I have a text file which have data in CSV format. "empno","phonenumber","wardnumber" 12345,2234353,1000202 12326,2243653,1000098 Iam a beginner of C/C++ programming. I don't know how to tokenize the comma separated values.I used strtok function reading line by line using fgets.but it gives some weird behavior.It doesnot stripout the "" fully.Could any body have sample code for the same so that it will be helfful for my...
21
2668
by: William Stacey [MVP] | last post by:
Anyone know of some library that will parse files like following: options { directory "/etc"; allow-query { any; }; // This is the default recursion no; listen-on { 192.168.0.225; }; forwarders { 4.2.2.2; }; };
4
2191
by: Remi Hugnon | last post by:
Hi, I want to build an expandable treeview. I saw some code on VB but I know only C# I plan for my class that each nodes has its own id (using span for example). Into a single aspx page without any other control, it's very easy because I play on URL and parameters and refresh my aspx. But in a screen having 2 treeview, I have the param and other controls. How can I organize my object in order to catch (meaning server side) wich node
1
4495
by: Henrik | last post by:
I'm sorry to trouble you once again but somebody must know how to get a list of the desktop icons and their respective positions. I know that I have to look into shell but I have no idea how to do it...! Regards I've found this bit of vb code but I don't know how to translate it
14
22571
by: micklee74 | last post by:
hi say i have string like this astring = 'abcd efgd 1234 fsdf gfds abcde 1234' if i want to find which postion is 1234, how can i achieve this...? i want to use index() but it only give me the first occurence. I want to know the positions of both "1234" thanks
5
2402
by: Andy | last post by:
I'm having trouble accessing an unmanaged long from a managed class in VC++.NET When I do, the contents of the variable seem to be mangled. If I access the same variable byte-by-byte, I get the correct value. Regardless what I set the variable to, the value that is returned for a long is always the same value. What's going on...can anyone help me? A short version of the code follows:
2
3501
by: Samuel R. Neff | last post by:
I'm using a quasi open-source project and am running into an exception in double.Parse which is effectively this: double.Parse(double.MinValue.ToString()) System.OverflowException: Value was either too large or too small for a Double. at System.Number.ParseDouble(String s, NumberStyles style, NumberFormatInfo info)
5
2438
by: meendar | last post by:
Hi, I just want to parse a character string as below Char * c=abcsyd"loddggg"kjskjdfsdf; I need to stripe out loddgg from c (inside ""). How can i do this in c?
2
3226
by: Lawrence Krubner | last post by:
Imagine a template system that works by getting a file, as a string, and then putting it through eval(), something like this: $formAsString = $controller->command("readFileAndReturnString", $formName); // 06-22-07 - the next commands try to import all the functions that the
0
8984
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9312
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8237
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.