日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

去掉txt文本某些字符

發布時間:2023/12/10 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 去掉txt文本某些字符 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

只刪除文本中的空格或者tab鍵 在文檔里同時手動寫入帶有空格和tab鍵分割的文本,看replace方法會不會區分開他們倆

inp = open('文件路徑','r',encoding='utf-8')#r為只讀模式 for line in inp.readlines():print(line)#測試seg_list=str(line).replace("\t","")#只將tab鍵替換為空串#seg_list = str(line).replace(" ", "")#只將控空格鍵替換為空串,可以將二者區分output = open('文件路徑2.txt','a',encoding='utf-8')#a為在后邊接著寫入的模式。w為刪除原來的在寫入的模式output.write(seg_list) output.close() inp.close() print("done")

以上代碼便可以實現只去掉空格或者只去掉tab鍵(制表符)
我剛發現python中將txt的tab鍵識別為\t,所以輸入四個空格或者一個tab都不能成功的用replace()方法去掉tab,輸入\t就可以了。
若要批量去掉多個無用字符,一個一個使用replace太麻煩,可以使用re中的模塊re.sub(’\s|\t|\n’,’’,待處理文本)這樣可以去掉“待處理文本”中的“\s|\t|\n”。好像\s包括了\t和\n,寫一個\s就好了。

import reinp = open('文件路徑','r',encoding='utf-8')#r為只讀模式 for line in inp.readlines():print(line)seg_list = re.sub('\t|\n| ', '', line)#批量將tab,換行符,空格替換為空串#寫入輸出文件output = open('文件路徑2.txt','a',encoding='utf-8')#a為在后邊接著寫入的模式。w為刪除原來的在寫入的模式output.write(seg_list) output.close() inp.close() print("done")

歡迎使用Markdown編輯器

你好! 這是你第一次使用 Markdown編輯器 所展示的歡迎頁。如果你想學習如何使用Markdown編輯器, 可以仔細閱讀這篇文章,了解一下Markdown的基本語法知識。

新的改變

我們對Markdown編輯器進行了一些功能拓展與語法支持,除了標準的Markdown編輯器功能,我們增加了如下幾點新功能,幫助你用它寫博客:

  • 全新的界面設計 ,將會帶來全新的寫作體驗;
  • 在創作中心設置你喜愛的代碼高亮樣式,Markdown 將代碼片顯示選擇的高亮樣式 進行展示;
  • 增加了 圖片拖拽 功能,你可以將本地的圖片直接拖拽到編輯區域直接展示;
  • 全新的 KaTeX數學公式 語法;
  • 增加了支持甘特圖的mermaid語法1 功能;
  • 增加了 多屏幕編輯 Markdown文章功能;
  • 增加了 焦點寫作模式、預覽模式、簡潔寫作模式、左右區域同步滾輪設置 等功能,功能按鈕位于編輯區域與預覽區域中間;
  • 增加了 檢查列表 功能。
  • 功能快捷鍵

    撤銷:Ctrl/Command + Z
    重做:Ctrl/Command + Y
    加粗:Ctrl/Command + B
    斜體:Ctrl/Command + I
    標題:Ctrl/Command + Shift + H
    無序列表:Ctrl/Command + Shift + U
    有序列表:Ctrl/Command + Shift + O
    檢查列表:Ctrl/Command + Shift + C
    插入代碼:Ctrl/Command + Shift + K
    插入鏈接:Ctrl/Command + Shift + L
    插入圖片:Ctrl/Command + Shift + G
    查找:Ctrl/Command + F
    替換:Ctrl/Command + G

    合理的創建標題,有助于目錄的生成

    直接輸入1次#,并按下space后,將生成1級標題。
    輸入2次#,并按下space后,將生成2級標題。
    以此類推,我們支持6級標題。有助于使用TOC語法后生成一個完美的目錄。

    如何改變文本的樣式

    強調文本 強調文本

    加粗文本 加粗文本

    標記文本

    刪除文本

    引用文本

    H2O is是液體。

    210 運算結果是 1024.

    插入鏈接與圖片

    鏈接: link.

    圖片:

    帶尺寸的圖片:

    居中的圖片:

    居中并且帶尺寸的圖片:

    當然,我們為了讓用戶更加便捷,我們增加了圖片拖拽功能。

    如何插入一段漂亮的代碼片

    去博客設置頁面,選擇一款你喜歡的代碼片高亮樣式,下面展示同樣高亮的 代碼片.

    // An highlighted block var foo = 'bar';

    生成一個適合你的列表

    • 項目
      • 項目
        • 項目
  • 項目1
  • 項目2
  • 項目3
    • 計劃任務
    • 完成任務

    創建一個表格

    一個簡單的表格是這么創建的:

    項目Value
    電腦$1600
    手機$12
    導管$1

    設定內容居中、居左、居右

    使用:---------:居中
    使用:----------居左
    使用----------:居右

    第一列第二列第三列
    第一列文本居中第二列文本居右第三列文本居左

    SmartyPants

    SmartyPants將ASCII標點字符轉換為“智能”印刷標點HTML實體。例如:

    TYPEASCIIHTML
    Single backticks'Isn't this fun?'‘Isn’t this fun?’
    Quotes"Isn't this fun?"“Isn’t this fun?”
    Dashes-- is en-dash, --- is em-dash– is en-dash, — is em-dash

    創建一個自定義列表

    Markdown
    Text-to-HTML conversion tool
    Authors
    John
    Luke

    如何創建一個注腳

    一個具有注腳的文本。2

    注釋也是必不可少的

    Markdown將文本轉換為 HTML。

    KaTeX數學公式

    您可以使用渲染LaTeX數學表達式 KaTeX:

    Gamma公式展示 Γ(n)=(n?1)!?n∈N\Gamma(n) = (n-1)!\quad\forall n\in\mathbb NΓ(n)=(n?1)!?nN 是通過歐拉積分

    Γ(z)=∫0∞tz?1e?tdt.\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. Γ(z)=0?tz?1e?tdt.

    你可以找到更多關于的信息 LaTeX 數學表達式here.

    新的甘特圖功能,豐富你的文章

    Mon 06Mon 13Mon 20已完成 進行中 計劃一 計劃二 現有任務Adding GANTT diagram functionality to mermaid
    • 關于 甘特圖 語法,參考 這兒,

    UML 圖表

    可以使用UML圖表進行渲染。 Mermaid. 例如下面產生的一個序列圖:

    #mermaid-svg-9GHxcBVxINAth7lA .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-9GHxcBVxINAth7lA .label text{fill:#333}#mermaid-svg-9GHxcBVxINAth7lA .node rect,#mermaid-svg-9GHxcBVxINAth7lA .node circle,#mermaid-svg-9GHxcBVxINAth7lA .node ellipse,#mermaid-svg-9GHxcBVxINAth7lA .node polygon,#mermaid-svg-9GHxcBVxINAth7lA .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-9GHxcBVxINAth7lA .node .label{text-align:center;fill:#333}#mermaid-svg-9GHxcBVxINAth7lA .node.clickable{cursor:pointer}#mermaid-svg-9GHxcBVxINAth7lA .arrowheadPath{fill:#333}#mermaid-svg-9GHxcBVxINAth7lA .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-9GHxcBVxINAth7lA .flowchart-link{stroke:#333;fill:none}#mermaid-svg-9GHxcBVxINAth7lA .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-9GHxcBVxINAth7lA .edgeLabel rect{opacity:0.9}#mermaid-svg-9GHxcBVxINAth7lA .edgeLabel span{color:#333}#mermaid-svg-9GHxcBVxINAth7lA .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-9GHxcBVxINAth7lA .cluster text{fill:#333}#mermaid-svg-9GHxcBVxINAth7lA div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-9GHxcBVxINAth7lA .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-9GHxcBVxINAth7lA text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-9GHxcBVxINAth7lA .actor-line{stroke:grey}#mermaid-svg-9GHxcBVxINAth7lA .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-9GHxcBVxINAth7lA .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-9GHxcBVxINAth7lA #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-9GHxcBVxINAth7lA .sequenceNumber{fill:#fff}#mermaid-svg-9GHxcBVxINAth7lA #sequencenumber{fill:#333}#mermaid-svg-9GHxcBVxINAth7lA #crosshead path{fill:#333;stroke:#333}#mermaid-svg-9GHxcBVxINAth7lA .messageText{fill:#333;stroke:#333}#mermaid-svg-9GHxcBVxINAth7lA .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-9GHxcBVxINAth7lA .labelText,#mermaid-svg-9GHxcBVxINAth7lA .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-9GHxcBVxINAth7lA .loopText,#mermaid-svg-9GHxcBVxINAth7lA .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-9GHxcBVxINAth7lA .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-9GHxcBVxINAth7lA .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-9GHxcBVxINAth7lA .noteText,#mermaid-svg-9GHxcBVxINAth7lA .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-9GHxcBVxINAth7lA .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-9GHxcBVxINAth7lA .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-9GHxcBVxINAth7lA .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-9GHxcBVxINAth7lA .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-9GHxcBVxINAth7lA .section{stroke:none;opacity:0.2}#mermaid-svg-9GHxcBVxINAth7lA .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-9GHxcBVxINAth7lA .section2{fill:#fff400}#mermaid-svg-9GHxcBVxINAth7lA .section1,#mermaid-svg-9GHxcBVxINAth7lA .section3{fill:#fff;opacity:0.2}#mermaid-svg-9GHxcBVxINAth7lA .sectionTitle0{fill:#333}#mermaid-svg-9GHxcBVxINAth7lA .sectionTitle1{fill:#333}#mermaid-svg-9GHxcBVxINAth7lA .sectionTitle2{fill:#333}#mermaid-svg-9GHxcBVxINAth7lA .sectionTitle3{fill:#333}#mermaid-svg-9GHxcBVxINAth7lA .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-9GHxcBVxINAth7lA .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-9GHxcBVxINAth7lA .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-9GHxcBVxINAth7lA .grid path{stroke-width:0}#mermaid-svg-9GHxcBVxINAth7lA .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-9GHxcBVxINAth7lA .task{stroke-width:2}#mermaid-svg-9GHxcBVxINAth7lA .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-9GHxcBVxINAth7lA .taskText:not([font-size]){font-size:11px}#mermaid-svg-9GHxcBVxINAth7lA .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-9GHxcBVxINAth7lA .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-9GHxcBVxINAth7lA .task.clickable{cursor:pointer}#mermaid-svg-9GHxcBVxINAth7lA .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-9GHxcBVxINAth7lA .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-9GHxcBVxINAth7lA .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-9GHxcBVxINAth7lA .taskText0,#mermaid-svg-9GHxcBVxINAth7lA .taskText1,#mermaid-svg-9GHxcBVxINAth7lA .taskText2,#mermaid-svg-9GHxcBVxINAth7lA .taskText3{fill:#fff}#mermaid-svg-9GHxcBVxINAth7lA .task0,#mermaid-svg-9GHxcBVxINAth7lA .task1,#mermaid-svg-9GHxcBVxINAth7lA .task2,#mermaid-svg-9GHxcBVxINAth7lA .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-9GHxcBVxINAth7lA .taskTextOutside0,#mermaid-svg-9GHxcBVxINAth7lA .taskTextOutside2{fill:#000}#mermaid-svg-9GHxcBVxINAth7lA .taskTextOutside1,#mermaid-svg-9GHxcBVxINAth7lA .taskTextOutside3{fill:#000}#mermaid-svg-9GHxcBVxINAth7lA .active0,#mermaid-svg-9GHxcBVxINAth7lA .active1,#mermaid-svg-9GHxcBVxINAth7lA .active2,#mermaid-svg-9GHxcBVxINAth7lA .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-9GHxcBVxINAth7lA .activeText0,#mermaid-svg-9GHxcBVxINAth7lA .activeText1,#mermaid-svg-9GHxcBVxINAth7lA .activeText2,#mermaid-svg-9GHxcBVxINAth7lA .activeText3{fill:#000 !important}#mermaid-svg-9GHxcBVxINAth7lA .done0,#mermaid-svg-9GHxcBVxINAth7lA .done1,#mermaid-svg-9GHxcBVxINAth7lA .done2,#mermaid-svg-9GHxcBVxINAth7lA .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-9GHxcBVxINAth7lA .doneText0,#mermaid-svg-9GHxcBVxINAth7lA .doneText1,#mermaid-svg-9GHxcBVxINAth7lA .doneText2,#mermaid-svg-9GHxcBVxINAth7lA .doneText3{fill:#000 !important}#mermaid-svg-9GHxcBVxINAth7lA .crit0,#mermaid-svg-9GHxcBVxINAth7lA .crit1,#mermaid-svg-9GHxcBVxINAth7lA .crit2,#mermaid-svg-9GHxcBVxINAth7lA .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-9GHxcBVxINAth7lA .activeCrit0,#mermaid-svg-9GHxcBVxINAth7lA .activeCrit1,#mermaid-svg-9GHxcBVxINAth7lA .activeCrit2,#mermaid-svg-9GHxcBVxINAth7lA .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-9GHxcBVxINAth7lA .doneCrit0,#mermaid-svg-9GHxcBVxINAth7lA .doneCrit1,#mermaid-svg-9GHxcBVxINAth7lA .doneCrit2,#mermaid-svg-9GHxcBVxINAth7lA .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-9GHxcBVxINAth7lA .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-9GHxcBVxINAth7lA .milestoneText{font-style:italic}#mermaid-svg-9GHxcBVxINAth7lA .doneCritText0,#mermaid-svg-9GHxcBVxINAth7lA .doneCritText1,#mermaid-svg-9GHxcBVxINAth7lA .doneCritText2,#mermaid-svg-9GHxcBVxINAth7lA .doneCritText3{fill:#000 !important}#mermaid-svg-9GHxcBVxINAth7lA .activeCritText0,#mermaid-svg-9GHxcBVxINAth7lA .activeCritText1,#mermaid-svg-9GHxcBVxINAth7lA .activeCritText2,#mermaid-svg-9GHxcBVxINAth7lA .activeCritText3{fill:#000 !important}#mermaid-svg-9GHxcBVxINAth7lA .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-9GHxcBVxINAth7lA g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-9GHxcBVxINAth7lA g.classGroup text .title{font-weight:bolder}#mermaid-svg-9GHxcBVxINAth7lA g.clickable{cursor:pointer}#mermaid-svg-9GHxcBVxINAth7lA g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-9GHxcBVxINAth7lA g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-9GHxcBVxINAth7lA .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-9GHxcBVxINAth7lA .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-9GHxcBVxINAth7lA .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-9GHxcBVxINAth7lA .dashed-line{stroke-dasharray:3}#mermaid-svg-9GHxcBVxINAth7lA #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-9GHxcBVxINAth7lA #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-9GHxcBVxINAth7lA #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-9GHxcBVxINAth7lA #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-9GHxcBVxINAth7lA #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-9GHxcBVxINAth7lA #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-9GHxcBVxINAth7lA #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-9GHxcBVxINAth7lA #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-9GHxcBVxINAth7lA .commit-id,#mermaid-svg-9GHxcBVxINAth7lA .commit-msg,#mermaid-svg-9GHxcBVxINAth7lA .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-9GHxcBVxINAth7lA .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-9GHxcBVxINAth7lA .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-9GHxcBVxINAth7lA g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-9GHxcBVxINAth7lA g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-9GHxcBVxINAth7lA g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-9GHxcBVxINAth7lA g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-9GHxcBVxINAth7lA g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-9GHxcBVxINAth7lA g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-9GHxcBVxINAth7lA .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-9GHxcBVxINAth7lA .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-9GHxcBVxINAth7lA .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-9GHxcBVxINAth7lA .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-9GHxcBVxINAth7lA .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-9GHxcBVxINAth7lA .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-9GHxcBVxINAth7lA .edgeLabel text{fill:#333}#mermaid-svg-9GHxcBVxINAth7lA .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-9GHxcBVxINAth7lA .node circle.state-start{fill:black;stroke:black}#mermaid-svg-9GHxcBVxINAth7lA .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-9GHxcBVxINAth7lA #statediagram-barbEnd{fill:#9370db}#mermaid-svg-9GHxcBVxINAth7lA .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-9GHxcBVxINAth7lA .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-9GHxcBVxINAth7lA .statediagram-state .divider{stroke:#9370db}#mermaid-svg-9GHxcBVxINAth7lA .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-9GHxcBVxINAth7lA .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-9GHxcBVxINAth7lA .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-9GHxcBVxINAth7lA .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-9GHxcBVxINAth7lA .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-9GHxcBVxINAth7lA .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-9GHxcBVxINAth7lA .note-edge{stroke-dasharray:5}#mermaid-svg-9GHxcBVxINAth7lA .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-9GHxcBVxINAth7lA .error-icon{fill:#522}#mermaid-svg-9GHxcBVxINAth7lA .error-text{fill:#522;stroke:#522}#mermaid-svg-9GHxcBVxINAth7lA .edge-thickness-normal{stroke-width:2px}#mermaid-svg-9GHxcBVxINAth7lA .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-9GHxcBVxINAth7lA .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-9GHxcBVxINAth7lA .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-9GHxcBVxINAth7lA .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-9GHxcBVxINAth7lA .marker{fill:#333}#mermaid-svg-9GHxcBVxINAth7lA .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}#mermaid-svg-9GHxcBVxINAth7lA {color: rgba(0, 0, 0, 0.75);font: ;}張三李四王五你好!李四, 最近怎么樣?你最近怎么樣,王五?我很好,謝謝!我很好,謝謝!李四想了很長時間, 文字太長了不適合放在一行.打量著王五...很好... 王五, 你怎么樣?張三李四王五

    這將產生一個流程圖。:

    #mermaid-svg-YN9ODSSGidj3Dadm .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-YN9ODSSGidj3Dadm .label text{fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm .node rect,#mermaid-svg-YN9ODSSGidj3Dadm .node circle,#mermaid-svg-YN9ODSSGidj3Dadm .node ellipse,#mermaid-svg-YN9ODSSGidj3Dadm .node polygon,#mermaid-svg-YN9ODSSGidj3Dadm .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-YN9ODSSGidj3Dadm .node .label{text-align:center;fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm .node.clickable{cursor:pointer}#mermaid-svg-YN9ODSSGidj3Dadm .arrowheadPath{fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-YN9ODSSGidj3Dadm .flowchart-link{stroke:#333;fill:none}#mermaid-svg-YN9ODSSGidj3Dadm .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-YN9ODSSGidj3Dadm .edgeLabel rect{opacity:0.9}#mermaid-svg-YN9ODSSGidj3Dadm .edgeLabel span{color:#333}#mermaid-svg-YN9ODSSGidj3Dadm .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-YN9ODSSGidj3Dadm .cluster text{fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-YN9ODSSGidj3Dadm .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-YN9ODSSGidj3Dadm text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-YN9ODSSGidj3Dadm .actor-line{stroke:grey}#mermaid-svg-YN9ODSSGidj3Dadm .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-YN9ODSSGidj3Dadm .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-YN9ODSSGidj3Dadm #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-YN9ODSSGidj3Dadm .sequenceNumber{fill:#fff}#mermaid-svg-YN9ODSSGidj3Dadm #sequencenumber{fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm #crosshead path{fill:#333;stroke:#333}#mermaid-svg-YN9ODSSGidj3Dadm .messageText{fill:#333;stroke:#333}#mermaid-svg-YN9ODSSGidj3Dadm .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-YN9ODSSGidj3Dadm .labelText,#mermaid-svg-YN9ODSSGidj3Dadm .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-YN9ODSSGidj3Dadm .loopText,#mermaid-svg-YN9ODSSGidj3Dadm .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-YN9ODSSGidj3Dadm .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-YN9ODSSGidj3Dadm .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-YN9ODSSGidj3Dadm .noteText,#mermaid-svg-YN9ODSSGidj3Dadm .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-YN9ODSSGidj3Dadm .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-YN9ODSSGidj3Dadm .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-YN9ODSSGidj3Dadm .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-YN9ODSSGidj3Dadm .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-YN9ODSSGidj3Dadm .section{stroke:none;opacity:0.2}#mermaid-svg-YN9ODSSGidj3Dadm .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-YN9ODSSGidj3Dadm .section2{fill:#fff400}#mermaid-svg-YN9ODSSGidj3Dadm .section1,#mermaid-svg-YN9ODSSGidj3Dadm .section3{fill:#fff;opacity:0.2}#mermaid-svg-YN9ODSSGidj3Dadm .sectionTitle0{fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm .sectionTitle1{fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm .sectionTitle2{fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm .sectionTitle3{fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-YN9ODSSGidj3Dadm .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-YN9ODSSGidj3Dadm .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-YN9ODSSGidj3Dadm .grid path{stroke-width:0}#mermaid-svg-YN9ODSSGidj3Dadm .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-YN9ODSSGidj3Dadm .task{stroke-width:2}#mermaid-svg-YN9ODSSGidj3Dadm .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-YN9ODSSGidj3Dadm .taskText:not([font-size]){font-size:11px}#mermaid-svg-YN9ODSSGidj3Dadm .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-YN9ODSSGidj3Dadm .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-YN9ODSSGidj3Dadm .task.clickable{cursor:pointer}#mermaid-svg-YN9ODSSGidj3Dadm .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-YN9ODSSGidj3Dadm .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-YN9ODSSGidj3Dadm .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-YN9ODSSGidj3Dadm .taskText0,#mermaid-svg-YN9ODSSGidj3Dadm .taskText1,#mermaid-svg-YN9ODSSGidj3Dadm .taskText2,#mermaid-svg-YN9ODSSGidj3Dadm .taskText3{fill:#fff}#mermaid-svg-YN9ODSSGidj3Dadm .task0,#mermaid-svg-YN9ODSSGidj3Dadm .task1,#mermaid-svg-YN9ODSSGidj3Dadm .task2,#mermaid-svg-YN9ODSSGidj3Dadm .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-YN9ODSSGidj3Dadm .taskTextOutside0,#mermaid-svg-YN9ODSSGidj3Dadm .taskTextOutside2{fill:#000}#mermaid-svg-YN9ODSSGidj3Dadm .taskTextOutside1,#mermaid-svg-YN9ODSSGidj3Dadm .taskTextOutside3{fill:#000}#mermaid-svg-YN9ODSSGidj3Dadm .active0,#mermaid-svg-YN9ODSSGidj3Dadm .active1,#mermaid-svg-YN9ODSSGidj3Dadm .active2,#mermaid-svg-YN9ODSSGidj3Dadm .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-YN9ODSSGidj3Dadm .activeText0,#mermaid-svg-YN9ODSSGidj3Dadm .activeText1,#mermaid-svg-YN9ODSSGidj3Dadm .activeText2,#mermaid-svg-YN9ODSSGidj3Dadm .activeText3{fill:#000 !important}#mermaid-svg-YN9ODSSGidj3Dadm .done0,#mermaid-svg-YN9ODSSGidj3Dadm .done1,#mermaid-svg-YN9ODSSGidj3Dadm .done2,#mermaid-svg-YN9ODSSGidj3Dadm .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-YN9ODSSGidj3Dadm .doneText0,#mermaid-svg-YN9ODSSGidj3Dadm .doneText1,#mermaid-svg-YN9ODSSGidj3Dadm .doneText2,#mermaid-svg-YN9ODSSGidj3Dadm .doneText3{fill:#000 !important}#mermaid-svg-YN9ODSSGidj3Dadm .crit0,#mermaid-svg-YN9ODSSGidj3Dadm .crit1,#mermaid-svg-YN9ODSSGidj3Dadm .crit2,#mermaid-svg-YN9ODSSGidj3Dadm .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-YN9ODSSGidj3Dadm .activeCrit0,#mermaid-svg-YN9ODSSGidj3Dadm .activeCrit1,#mermaid-svg-YN9ODSSGidj3Dadm .activeCrit2,#mermaid-svg-YN9ODSSGidj3Dadm .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-YN9ODSSGidj3Dadm .doneCrit0,#mermaid-svg-YN9ODSSGidj3Dadm .doneCrit1,#mermaid-svg-YN9ODSSGidj3Dadm .doneCrit2,#mermaid-svg-YN9ODSSGidj3Dadm .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-YN9ODSSGidj3Dadm .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-YN9ODSSGidj3Dadm .milestoneText{font-style:italic}#mermaid-svg-YN9ODSSGidj3Dadm .doneCritText0,#mermaid-svg-YN9ODSSGidj3Dadm .doneCritText1,#mermaid-svg-YN9ODSSGidj3Dadm .doneCritText2,#mermaid-svg-YN9ODSSGidj3Dadm .doneCritText3{fill:#000 !important}#mermaid-svg-YN9ODSSGidj3Dadm .activeCritText0,#mermaid-svg-YN9ODSSGidj3Dadm .activeCritText1,#mermaid-svg-YN9ODSSGidj3Dadm .activeCritText2,#mermaid-svg-YN9ODSSGidj3Dadm .activeCritText3{fill:#000 !important}#mermaid-svg-YN9ODSSGidj3Dadm .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-YN9ODSSGidj3Dadm g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-YN9ODSSGidj3Dadm g.classGroup text .title{font-weight:bolder}#mermaid-svg-YN9ODSSGidj3Dadm g.clickable{cursor:pointer}#mermaid-svg-YN9ODSSGidj3Dadm g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-YN9ODSSGidj3Dadm g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-YN9ODSSGidj3Dadm .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-YN9ODSSGidj3Dadm .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-YN9ODSSGidj3Dadm .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-YN9ODSSGidj3Dadm .dashed-line{stroke-dasharray:3}#mermaid-svg-YN9ODSSGidj3Dadm #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-YN9ODSSGidj3Dadm #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-YN9ODSSGidj3Dadm #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-YN9ODSSGidj3Dadm #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-YN9ODSSGidj3Dadm #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-YN9ODSSGidj3Dadm #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-YN9ODSSGidj3Dadm #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-YN9ODSSGidj3Dadm #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-YN9ODSSGidj3Dadm .commit-id,#mermaid-svg-YN9ODSSGidj3Dadm .commit-msg,#mermaid-svg-YN9ODSSGidj3Dadm .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-YN9ODSSGidj3Dadm .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-YN9ODSSGidj3Dadm .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-YN9ODSSGidj3Dadm g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-YN9ODSSGidj3Dadm g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-YN9ODSSGidj3Dadm g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-YN9ODSSGidj3Dadm g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-YN9ODSSGidj3Dadm g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-YN9ODSSGidj3Dadm .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-YN9ODSSGidj3Dadm .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-YN9ODSSGidj3Dadm .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-YN9ODSSGidj3Dadm .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-YN9ODSSGidj3Dadm .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-YN9ODSSGidj3Dadm .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-YN9ODSSGidj3Dadm .edgeLabel text{fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-YN9ODSSGidj3Dadm .node circle.state-start{fill:black;stroke:black}#mermaid-svg-YN9ODSSGidj3Dadm .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-YN9ODSSGidj3Dadm #statediagram-barbEnd{fill:#9370db}#mermaid-svg-YN9ODSSGidj3Dadm .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-YN9ODSSGidj3Dadm .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-YN9ODSSGidj3Dadm .statediagram-state .divider{stroke:#9370db}#mermaid-svg-YN9ODSSGidj3Dadm .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-YN9ODSSGidj3Dadm .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-YN9ODSSGidj3Dadm .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-YN9ODSSGidj3Dadm .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-YN9ODSSGidj3Dadm .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-YN9ODSSGidj3Dadm .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-YN9ODSSGidj3Dadm .note-edge{stroke-dasharray:5}#mermaid-svg-YN9ODSSGidj3Dadm .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-YN9ODSSGidj3Dadm .error-icon{fill:#522}#mermaid-svg-YN9ODSSGidj3Dadm .error-text{fill:#522;stroke:#522}#mermaid-svg-YN9ODSSGidj3Dadm .edge-thickness-normal{stroke-width:2px}#mermaid-svg-YN9ODSSGidj3Dadm .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-YN9ODSSGidj3Dadm .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-YN9ODSSGidj3Dadm .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-YN9ODSSGidj3Dadm .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-YN9ODSSGidj3Dadm .marker{fill:#333}#mermaid-svg-YN9ODSSGidj3Dadm .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}#mermaid-svg-YN9ODSSGidj3Dadm {color: rgba(0, 0, 0, 0.75);font: ;}鏈接長方形圓圓角長方形菱形
    • 關于 Mermaid 語法,參考 這兒,

    FLowchart流程圖

    我們依舊會支持flowchart的流程圖:

    Created with Rapha?l 2.2.0開始我的操作確認?結束yesno
    • 關于 Flowchart流程圖 語法,參考 這兒.

    導出與導入

    導出

    如果你想嘗試使用此編輯器, 你可以在此篇文章任意編輯。當你完成了一篇文章的寫作, 在上方工具欄找到 文章導出 ,生成一個.md文件或者.html文件進行本地保存。

    導入

    如果你想加載一篇你寫過的.md文件,在上方工具欄可以選擇導入功能進行對應擴展名的文件導入,
    繼續你的創作。


  • mermaid語法說明 ??

  • 注腳的解釋 ??

  • 總結

    以上是生活随笔為你收集整理的去掉txt文本某些字符的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。