البرمجة

استخراج أسماء الملفات بواسطة التعبير العادي

To extract the text after ” – ” in each line, you can use the following regular expression:

regex
(?<= - ).*$

Explanation of the regular expression:

  • (?<= - ): Positive lookbehind to match the " - " sequence without including it in the match.
  • .*: Match any character (except for line terminators) zero or more times.
  • $: Asserts position at the end of the line.

In your application, you can use this regular expression to extract the desired text and use it for renaming files.

المزيد من المعلومات

لديك هنا هيكل مجلدات يتضمن اسماء الملفات. كل اسم ملف يبدأ بعد النقطة والفاصلة ("-") يجب أن يتم استخراجه ليكون الاسم الجديد للملف. يمكنك استخدام تعبير عادي (Regular Expression) لاستخراج هذا الجزء من النص. وبما أن الهيكل ثابت، فإن التعبير العادي الذي يمكن استخدامه هو: (?<= - ).*$.

زر الذهاب إلى الأعلى