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...
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...
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
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...
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...
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)...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.