Quote:
Originally Posted by theducks
The Regex only works within a book and you can only open 1 book in an editor session.
Besides, I don't see how REGEX is a simple solution. You need to identify the target.
If you have multiple monitors, you could use the CLI to open 2 editor sessions (2 Monitors leaves both in front ) and copy and paste between
|
My origin file:
cap1_es
My origen text:
<a data-index="18es"><sup class="bkm">18</sup></a>
My target file:
cap1_en
My target text:
<sup class="bkm">18</sup>
I want this origen text
<a data-index="18es"> in the target text.
I have found this in a web site:
Capture the group you're interested in (ie, between quotes), extract the matches from each line, then write them one per line to the new file, eg:
import re
with open('input') as fin, open('output', 'w') as fout:
for line in fin:
matches = re.findall('"(.*?)"', line)
fout.writelines(match + '\n' for match in matches)
Is it a possible solution?