News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Parsing text file

Started by sepult, July 06, 2023, 02:28:28 PM

Previous topic - Next topic

sepult

Hello everyone. Is there's a source code or snippets to parse text file? I have to find some text by patterns in txt. Thanks

zedd151

Hi. Could you post an example of what you are trying to achieve? Pseudocode is fine, just so we can get the gist of what exactly it is that you are after.

Are you trying to search for a string? "????X?????Y????Z" where the X Y and Z are always in the same positions, and the ? Are unknown...  Something like that?
Also, 32 or 64 bit?

Do a search using the forum search function. Search "text parser" ... maybe you will find something that will help you. Search must be done from forum home page to search all boards within the forum btw.

Maybe something like this  https://masm32.com/board/index.php?topic=10353.msg113406#msg113406  ???
Are you looking for words, sequence of characters, single characters, or ????
Or trying to find a string within a string?
Do you have any code started?

jj2007

Check \Masm32\examples\unicode_generic\string_examples\find$\find$.asm

zedd151

Quote from: sepult on July 06, 2023, 02:28:28 PM
I have to find some text by patterns in txt.
What is the format of the patterns that you mentioned? Can you give an example?
ascii or unicode?

Vortex

Hi sepult,

You can check the manual of masm32.lib :

QuoteSearch Functions

InString
BinSearch
Boyer Moore Algorithms
WordCount
partial

The help file :

\masm32\help\masmlib.chm

zedd151

#5
More in depth discussion found here...  Parsing Text file in Assembly Language,  a rather 'advanced' topic by NoCforMe.
Originally that topic was part of the replies from this thread, it is well beyond 'newbie' material, also the OP, "sepult",  has not replied to our queries asking exactly what they needed, and apparently abandoned the thread.