hi all,
i am working on a java application. i have this table which contains
name fields and all of them start with a N-. so the table contains
records like N-TomSmith, N-PeterSay etc.
now from within my java class i am trying to read these records.
now the main bit, how should i specify my class to pick up all records
which start with N-.
am trying to read about reg expressions in the meantime. i hope
somebody can help me.
thanks.
Knute Johnson - 04 Apr 2006 06:34 GMT
> hi all,
> i am working on a java application. i have this table which contains
[quoted text clipped - 6 lines]
> somebody can help me.
> thanks.
Have you split them into strings? If so you can check the first
characters with String.startsWith().

Signature
Knute Johnson
email s/nospam/knute/
Roedy Green - 04 Apr 2006 15:48 GMT
>i am working on a java application. i have this table which contains
>name fields and all of them start with a N-. so the table contains
[quoted text clipped - 4 lines]
>am trying to read about reg expressions in the meantime. i hope
>somebody can help me.
field.charAt(0) == 'N' && field.charAt(1) == '-'
or
field.startsWith( "N-" )

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.