Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Jarrod13

    Leading zeros in currency check

    I'm trying to modify the following regular expression so that leading zeros will fail the check. if(Currency !~ /^((|-)[0-9]+\.[0-9][0-9])$/ && Currency !~ "^[ \t]*$") For example, if I input 00000500.25 This will pass the regex, I would like that to fail. The following should pass...
  2. Jarrod13

    Space after zip code

    That got it! Thanks so much :-)
  3. Jarrod13

    Space after zip code

    I'm trying to modify this regular expression so that a zip code with a space directly after it will pass. That is, if I have a zip code "45887 " It will not be added to the "BadZipCount array" I've highlighted in blue what I have now. It will check for a space before and after the zip code...
  4. Jarrod13

    Checking for spaces in fields with Regular Expression

    Thank you, I also came up with this: x ~ "^[ \t]*$"
  5. Jarrod13

    Checking for spaces in fields with Regular Expression

    Hi, I need help writing a regular expression to check for anything >= to 1 space. That is, if my record seperator is a "|" if I have a field that is | | or | | or | | I want the regular expression to be able to check for that. Thanks for the help
  6. Jarrod13

    Change Current Directory

    Annihilannic, Thanks for the work around. I'm happy accepting it as a bug as well. I'm using AWK version 3.1.6 w/ XP (cygwin library) J
  7. Jarrod13

    Change Current Directory

    I'm trying to use the system command to change the current directory: My root directory is c:\qa1.0, When I run the following code I'm setting the DIRECTORY variable to "c:\qa1.0\Pass" The system command is not recognizing the DIRECTORY variable. print("Please enter the directory you wish...
  8. Jarrod13

    Help with traversing records in an AWK .exe

    feherke, Annihilannic, Thank you again for your excellent advice and help.
  9. Jarrod13

    Help with traversing records in an AWK .exe

    Feherke, thank you for your help. I used NR in the for statement so that the loop will run until it reaches the end of the file. for(i = 0; i < NR; i++) So when i is equal to NR it will be processing the last record in the file. Why is this incorrect? You ControlSum() solution worked for...
  10. Jarrod13

    Help with traversing records in an AWK .exe

    sorry no luck with that.
  11. Jarrod13

    Help with traversing records in an AWK .exe

    feherke, Thanks for your quick response. I am new to AWK and I'm still learning its functionality. I tried your solution to my problem and I'm still getting the same error. Let me give you some background as to what I'm trying to do: I'm working on an awk program that is compiled (by MKS)...
  12. Jarrod13

    Help with traversing records in an AWK .exe

    Okay, I'm having a problem with an awk program I'm working on. What I'm doing is checking the entire file for a hex non printable character. This is how I do it: for(f = 0; f <= NR; f++){ if (match($0, /\x1B/) != 0) { NON_PRINT_CHAR = 1...

Part and Inventory Search

Back
Top