M
maggie
hi,
I've been working getting a file parsed out using Regex. There's something I
don't understand. When I define the pattern for my fields in my file, I am
telling regex to grab those fields ( strings and salary figures, numbers with
decimals) . Some of the fields contain commas, so that's why I'm using Regex.
This is a comma-delimited file. I am not understanding the Split command.
Right now , my file is being split into 4 occurrences, not the 25 or so , for
each field. I'm really stuck. Can somebody explain? I think that might help.
If my file is split on commas, then how do I tell Regex that? In the pattern?
thanks-
I've been working getting a file parsed out using Regex. There's something I
don't understand. When I define the pattern for my fields in my file, I am
telling regex to grab those fields ( strings and salary figures, numbers with
decimals) . Some of the fields contain commas, so that's why I'm using Regex.
This is a comma-delimited file. I am not understanding the Split command.
Right now , my file is being split into 4 occurrences, not the 25 or so , for
each field. I'm really stuck. Can somebody explain? I think that might help.
If my file is split on commas, then how do I tell Regex that? In the pattern?
thanks-
Code:
Dim objRE
Dim i As Integer
Dim pattern As String
pattern = " [a-z/.0-9]+([0-9,]{5}.[0-9]{2})" ' sort of works
objRE = New Regex(pattern)
'from 4guys :
SplitAdv = Split(objRE.Replace(strInput, "\b"), "\b")