Is it possible to join a multiline string using python regex in Sikuli??
In sikuli I've get a multiline string from clipboard like this...
Names = App.getClipboard();
Name =
#corazona
#Pebleo00
#cofriasd
«paflio
and I have use this regex to delete the first character
if it is not in x00-x7f hex range or is not a word, or is a digit
import re
Names = re.sub(
So now...
Names =
corazona
Pebleo00
cofriasd
paflio
I am having trouble with the second regex that convert "Names" into a kinda List
I would like to convert "Names" into...
'corazona', 'Pebleo00', 'cofriasd', 'paflio',
So sikuli can then recognize it as a List by using...
NamesAsList = eval(Names)
in order to get a proper List to work with
How could I do this in python? is it necessary to use regex, or there is other way to do this in python?
I have already done this but using .Net regex, I just don't know how to do it in python, I have googled it with no result.
This is how I did it using .Net regex
Text to find:
(.*[^$])(\r\n|\z)
Replace with:
'$1',%" "%
Thanks Advanced.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- eduardobedoya
- Solved:
- Last query:
- Last reply: