regex - Powershell中插入符号(^)的转义字符
问题描述
我需要用制表符(“ t") in a CSV file in Powershell.
I tried escaping caret with a backtick(
^~`^)替换“^~^”,但它不起作用。我该怎么做?
$file=导入-Csv $dataFilePath
$file - 替换 " ^~
^", "`t"
解决方案
那是你要找的吗?
>$s = "^~^"
>$s -replace "\^\~\^", "``t"
`t
希望有帮助。
推荐阅读
- python - 使用python在硒中打开谷歌浏览器时出错
- java - Http Post的响应码是415,如何让响应码变成200
- android - 如何提取消息标题和正文形式 OneSignal 推送通知 Flutter
- php - 获取包含父母、孩子和元数据的帖子类型
- multicast - Ghost 12 - 不能跨子网多播
- python - pip install regex 无法在 Anaconda python3.6.9 virtualenv 上构建
- go - 如何在 Go 中正确编写 JVM AES/CFB8 加密
- python-3.x - TypeError: unhashable type: 'numpy.ndarray' 合并来自 BigQuery 的 pandas 数据帧时
- android - StartActivityForResult 使用 Room、Coroutine 和 ViewModel 调用了两次
- python - ALSA - 无法获取 CTL elem 的信息