I want to replace
<th scope="col">@translate(Product)</th>
code row to
<th scope="col">{{trans("file.Product")}}</th>
in NotePad++ but I can't write exactly correct regular expression. Help me please.
<th scope="col">\K@translate\((.+?)\)(?=</th>)
{{trans("file.$1")}}
Explanation:
<th scope="col"> # literally
\K # forget all we have seen until this position
@translate # literally
\( # openning parenthesis
(.+?) # group 1, 1 or more any character, not greedy
\) # closing parenthesis
(?=</th>) # positive lookahead, make sure we have a closing tag after
Screenshot (before):
Screenshot (after):