separate fields

F

Frank Dulk

I have a field with that value and others seemed.

en: street of the shades 123456#8 #[01/06/2006].

as I can have in separate fields:

campo1 = 123456
campo2 = 8
campo3 = 01/06/2006

reminded that the name of the street can change.
that part 123456#8 #[01/06/2006]
It will always be like this only seedling the amount of numbers, but it will
always be like this.


Thank you
 
J

John Nurick

Hi Frank,

One approach would be to use the rgxExtract function at
http://www.j.nurick.dial.pipex.com/Code/vbRegex/rgxExtract.htm

with a pattern like this

^.*\s(\d+)#(\d+)\s+#\[([^]]*)\]

where the three sets of parentheses gather

campo1 - one or more digits 0-9 separated by white space from the
preceding characters and terminated by a #,

campo2 - one or more digits 0-9 following the # after campo1 and
terminated by white space

campo3 - following the white space after campo2, any characters enclosed
between #[ and ]



I have a field with that value and others seemed.

en: street of the shades 123456#8 #[01/06/2006].

as I can have in separate fields:

campo1 = 123456
campo2 = 8
campo3 = 01/06/2006

reminded that the name of the street can change.
that part 123456#8 #[01/06/2006]
It will always be like this only seedling the amount of numbers, but it will
always be like this.


Thank you
 
Top