Translation of a dynamic regex in awk
I am writing a number of dynamic regular expressions. These can get quite complicated.
Is it possible to write an awk function that takes a dynamic regex and prints only what awk would actually see when interpreting the dynamic regex ? |
regexp itself is just a string. You can print it as any other string (if it is stored in a variable). But you cannot print a regex like this:
Code:
gsub(/regex/, "") |
You are correct, I can print the string. But the string could contain any sort of escape sequences and so on.
What I am looking to do is exclude the complications to have a better and clear idea of what it would match. |
|
All times are GMT -5. The time now is 12:34 PM. |