Possible Duplicate:How to use regrex with AWK for string replacement in this example? Suppose there is some text from a file:(bookmarks(Chapter 1 Introduction 1 #1(1.1 Problem Statement and Basic Definitions 23 #2)(Exercises 31 #30)(Notes and References 42 #34)))I want to add 11 to each number followed by a  in each line if there is one, ie (bookmarks(Chapter 1 Introduction 12 #12(1.1 Problem Statement and Basic Definitions 34 #13)(Exercises 42 #41)(Notes and References 53 #45)))Here is my solution by using GNU AWK and regex:awk -F'#' 'NF>1{gsub(/(\d+)\/, \1+11\)}'i.e., I want to replace (\d+)\ with  \1+10\, where \1 is the group representing (\d+). But it doesn't work. So I wonder how to make it work?If gawk is not the best solution, what else can be used?Thanks and regards!
How to use regrex with AWK for string replacement in this example?
text processing;regular expression;awk