我想删除所有包含特定字符的行。更好的办法是确定是否有仅包含该字符的行(例如冒号),然后将该字符添加到下一行或之前的行中,但是我想那有点复杂。
我有以下文件(例如):
first line
second line
third line
;
现在我想成为这样:
first line
second line
third line;
答案 0 :(得分:1)
此脚本仅删除以下行:
var client = new RestClient("https://login.microsoftonline.com/{tenant}/oauth2/token");
var request = new RestRequest("", Method.POST);
request.AddParameter("grant_type", "client_credentials");
request.AddParameter("client_id", "00000f-0000-00-00-000000");
request.AddParameter("client_secret", "][M.&*******?*_5z)y${*[)");
request.AddParameter("resourse", "https://tenant.onmicrosoft.com/4815c06b-7e28-4f88-9dc8-8fe3354d5909");
IRestResponse response = client.Execute(request);
var content = response.Content; // raw con
像 var client = new RestClient("https://app.vssps.visualstudio.com/oauth2/token");
var request = new RestRequest("", Method.POST);
request.AddParameter("client_id", "My APP code here";
request.AddParameter("client_secret", "My ap secret here");
request.AddParameter("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer");
request.AddParameter("client_assertion", "access token here");
request.AddParameter("grant_type", "authorization_code");
这样称呼它。