REGEXPR help, please 
Author Message
 REGEXPR help, please

Hi,

  What I'm attempting to do is find the first non-0 in the string of numbers.
The following code should, if I'm reading the help screen correctly, return 1
as the position and 1 as the length. But, for the life of me I can't get that
answer. It seems that the '^' modifier is disregarded.

  Any help out there?

TIA,

   ____    _    ____      ____  _____
  |  _ \  / \  / ___) __ | ___)(_   _) Don Schullian

  |____//_/ \_\(____/\__/|_|     |_|    www.DASoftVSS.com
  ___________________________________   www.basicguru.com
      Vertical Software Solutions

FUNCTION PBMAIN ()

  DIM D AS LOCAL STRING
  DIM L AS LOCAL LONG
  DIM N AS LOCAL STRING
  DIM P AS LOCAL LONG

  N = "220923"
  D = "[^0]"

  REGEXPR D IN N TO P, L
  PRINT N
  PRINT P, L

  WAITKEY$

END FUNCTION

   ____    _    ____      ____  _____
  |  _ \  / \  / ___) __ | ___)(_   _) Don Schullian

  |____//_/ \_\(____/\__/|_|     |_|    www.DASoftVSS.com
  ___________________________________   www.basicguru.com
      Vertical Software Solutions



Fri, 14 Dec 2001 03:00:00 GMT  
 REGEXPR help, please
  D = "[1-9]"

Quote:

>Hi,

>  What I'm attempting to do is find the first non-0 in the string of numbers.

Lance
powerbasic Support

-------------------------------------------------------------------------
PowerBASIC, Inc.      | 800-780-7707 Sales | "We put the Power in Basic!"
316 Mid Valley Center | 831-659-8000 Voice | http://www.powerbasic.com



Fri, 14 Dec 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. please, please, please, please, help

2. will someone please, please, please, please HELP me?!!

3. VSE 3.1 Repository Problem: Please help (please please?)

4. PLEASE PLEASE PLEASE HELP !!!!!!!!!!!!

5. please,please please do help us

6. help please-----please help about array in DLL

7. HELP !..PLEASE,PLEASe,PLEAse,PLEase,PLease,Please,please.....

8. Ord Function HELP Please HELP HELP HELP

9. pb/cc REGEXPR example misleading

10. REGEXPR routine for PB/DOS

11. Regular Expression mystery REGEXPR

12. regexpr. and metachars

 

 
Powered by phpBB® Forum Software