News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

pattern functions

Started by stanks, January 24, 2012, 01:48:49 PM

Previous topic - Next topic

stanks

how to and which functions to use to "filter" files that have 2 or more dots in the name?

example:

filename: test1.test2.test3

output should be:

test1

i was testing pat.oneChar, pat.upToCset, pat.getPos then str.substr but i always get HLA exception :(. i preserved ebx, esi and edi regs but still i get exceptions

thanks

dedndave

in those cases, i parse backwards from the end of the string
everything after the last period is an extension
everything else after the last "/", "\", or ":" is a part of the file name

filename: C:\someFolder\test1.test2.test3


file name: test1.test2
extension: test3

stanks

yes i did this with masm too but i want to use hla pattern functions