如何大写 $1 输出
How to uppercase $1 output
我试图在 TextMate 的 find/replace 语句中将输出大写。这是我必须隔离的文本:
Find: (uv.+)
Replace:
我会怎么做:"".upper()
Input:
https://store.playstation.com/#!/en-us/movies/cid=uv0012-npvb22701_cn-0000000000307457
Desired Output:
https://store.playstation.com/#!/en-us/movies/cid=UV0012-NPVB22701_CN-0000000000307457
来自手册第 20.4.2 节:
It is possible to convert the next character to upper or lowercase by
prepending it with \u or \l. This is mainly useful when the next
character stems from a capture register. Example:
Find: (<a.*?>)(.*?)(</a>)
Replace: \u
You can also convert a
longer sequence to upper or lowercase by using \U or \L and then \E to
disable the case folding again. Example:
Find: (<a.*?>)(.*?)(</a>)
Replace: \U\E
我试图在 TextMate 的 find/replace 语句中将输出大写。这是我必须隔离的文本:
Find: (uv.+)
Replace:
我会怎么做:"".upper()
Input:
https://store.playstation.com/#!/en-us/movies/cid=uv0012-npvb22701_cn-0000000000307457
Desired Output:
https://store.playstation.com/#!/en-us/movies/cid=UV0012-NPVB22701_CN-0000000000307457
来自手册第 20.4.2 节:
It is possible to convert the next character to upper or lowercase by prepending it with \u or \l. This is mainly useful when the next character stems from a capture register. Example:
Find: (<a.*?>)(.*?)(</a>) Replace: \u
You can also convert a longer sequence to upper or lowercase by using \U or \L and then \E to disable the case folding again. Example:
Find: (<a.*?>)(.*?)(</a>) Replace: \U\E