日本語プログラミング言語なでしこの公式掲示板
なでしこ の
掲示板
トップ
公式
書き込みの前に必ず掲示板のルールについて確認をお願いします。(
こちら
)
プログラミングの質問については、必ず解決した際に質問者は、解決したことを明記してもらえるようお願いします。(
こちら
)
1244番に対する返信です。(親記事1244番)
名前(必修)
メール(必修)
タイトル(必修)
カテゴリ(必修)
コメント
補足
解決
終了
本文(必修)
■本文始まり■ こんにちは、初心者です。 txtフォルダの中身を改変し、クリップボードに保存後、中身を消去(空っぽ)にするソフトウェアを作りたいです。 (知恵袋でも質問しました。 ) 以下のようなコードを組んだのですが、(1)の文章が(2)のように変化してしまい、正規表現置換がうまくいきません。 正規表現で検索されたものをもとに、「改行」だけを消し半角スペースに置き換えたいのですが、どのようにすればよいのでしょうか? また、編集元の「test.txt」をまっさらな状態で上書きする方法がわかりません。 無知蒙昧で申し訳ありませんが、ご教授いただけると幸いです。 「C:\Users\Desktop\test.txt」を開く。 それの、 『{i}』を「」に置換 『{/i}』を「」に置換 『{b}』を「」に置換 『{/b}』を「」に置換 「.\n[a-z]」を「.\s[a-z]」へ正規表現置換。 内容=それ 内容をコピー #----------------------------------------------------------------------- # 以下、確認画面 #----------------------------------------------------------------------- 「 以下がクリップボードにコピーされています。 ------------------------------------------- {内容} 」のメモ記入。 終わり。 ──────────────────────────────────── (1) This is a sample text message. If you select {i}Delimited text{/i}, a Microsoft Notepad page opens with sample text. For this {b}reason{/b} we filter out vectors with sample text, instructions and any other text that isn't a core part of the design. Choice: Displays the sample text spoken by the TTS playback voice. Choice: If there is sample text on the label, click it. Choice: Just choose the appropriate setting from a list and evaluate the presentation of the sample text in the Preview area. Choice: This sample text illustrates the current settings. You may edit it to test special characters. Player chose: Just choose the appropriate setting from a list and evaluate the presentation of the sample text in the Preview area. To provide this list, replace the sample text in the Type each choice on a separate line box with the values that you want. ──────────────────────────────────── (2) This is a sample text message. If you select Delimited text, a Microsoft Notepad page.s[a-z]pens with sample text. For this reason we filter out vectors with sample text,.s[a-z]nstructions and any other text that isn't a core part of the design. Choice: Displays the sample text spoken by the TTS playback voice. Choice: If there is sample text on the label, click it. Choice: Just choose the appropriate setting from a list and evaluate the presentation.s[a-z]f the sample text in the Preview area. Choice: This sample text illustrates the current settings. You may edit it to test special characters. Player chose: Just choose the appropriate setting from a list and evaluate the presentation.s[a-z]f the sample text in the Preview area. To provide this list, replace the sample text in the Type each choice.s[a-z]n a separate line box with the values that you want. ──────────────────────────────────── ■本文終わり■
顔文字
😄
😁
😌
😍
😉
😜
😢
😭
😓
😞
😣
😖
😖
😲
😱
😠
😡
😔
😒
絵文字
🎵
🎶
❗
❤
💔
✨
👀
👂
💋
✊
✌
✋
👊
👍
🏃
👣
💨
💦
💢
💤
💡
☀
☁
☔
⛄
⚡
🌀
🌊
🗻
🌙
🍀
🌷
🍁
🎂
🎁
👑
🔔
🌸
🎄
🐶
🐱
🐷
🐴
🐤
🐟
🍴
🍺
🍶
🍸
🍵
☕
🍰
🍙
🍞
🍎
🍔
🏠
🏢
🏫
🏥
🏣
🏧
🏦
🏪
🏨
🚲
🚗
🚙
🚌
🚃
⛽
🚥
🚄
🚢
⛵
✈
📱
📲
📩
☎\
📠
💻
📺
💿
🔍
🔑
✂
📖
📝
💣
💰
🕙
🎩
👟
👠
👕
👜
🌂
🎀
💄
💍
🎧
🎤
🎬
🎥
📷
🎨
🏀
⚽
⚾
🎾
⛳
🎿
🏁
↘
↙
🆗
🆕
🆔
🈳
🈵
㊙
🚻
♿
🚬
🚭
♠
♥
♣
♦
⭕
♨
⚠
♈
♉
♊
♋
♌
♍
♎
♏
♐
♑
♒
♓
©
®
™
合言葉(必修)
(『ナビ』と入力してください)
リンク/画像(任意)
画像アップ(.jpgファイル)(任意)
なでしこアップ(.nakoファイル)(任意)