| Subject |
Re: manipulating a string |
| From |
Robbie Nott <robnott@mweb.co.za> |
| Date |
Mon, 21 Mar 2022 03:47:05 +0200 |
| Newsgroups |
dbase.getting-started |
Hi Lee & Mervyn
17 lines vs 75
Mervyn's code is awesome
Recent help ( much appreciated ) from Mervyn with Windows' User32
library and now this are slowly opening my eyes to using functions
outside of dBase.
Will certainly look into regEx
After all, why re-invent the wheel ?
Robbie
On 3/20/2022 11:29 PM, Lee Grant wrote:
> Mervyn,
>
> Thanks for showing me one way to use my new regex skills in dBASE with
> this example. I've heard you mention you like using it here, but wasn't
> sure how you did that. Now I know. :)
>
> Robbie,
>
> Thanks for also showing another way to skin that cat. :)
>
> Lee
>
> On 3/20/2022 12:51 PM, Mervyn Bick wrote:
> <snip>
>> It can be done using dBASE functions but using a regular expression
>> will do the job a lot faster.
>>
>> A little example is attached. It will add 0 to the front of 4 digits
>> between any number of character at the beginning of the sku and any
>> number of characters at the end of the sku. If there are 5 digits no
>> change will be made.
>>
>> There shouldn't be a problem but make sure you have a backup of the
>> table safely tucked away before you run the program.
>>
>> Mervyn
>
--
This email has been checked for viruses by AVG.
https://www.avg.com
|
|