Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BEGIN{
- # this is the full rgeex pattern i want to use
- # if (match ($0, /^[a-zA-Z]+\tdouble|char\t[0-9]+|N\/A\t[a-zA-Z\s]+/))
- # using this variable DOES work
- col1 = "[a-zA-Z]+";
- # using this variable DOESNT work
- col2 = "double|char";
- }
- {
- if (match ($0, /^(col1)\t(col2)\t[0-9]+|N\/A\t[a-zA-Z\s]+$/))
- {
- print $0;
- }
- else
- {
- print "No match";
- }
- }
- END{
- #Stuff for the end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement