Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert VBA to Python
#5
Thanks for answering =D

First I want to say that this function will handle text generated by a system, so the two situations you mentioned will never happen..
1) if the cut_2 string is found before the cut_1 string? Never happen
2) if you still find cut_1 in the string but there are no more cut_2's? Never happen

Now talking about what the function should do:
- she should remove pieces of text from a larger text
- the pieces to be removed will always be delimited by the same sequence at the beginning and end
- the text that will be between the delimiters is variable, we dont know the size or the information
- for example: use text "#123" to delimit the beginning and text "%456" to delimit the end
- an example of text would be: #123 hello %456 im eating #123@@%456 #123%456 now #123 bye%456
- the function must remove the sequences: #123 hello %456 / #123@@%456 / #123%456 / #123 bye%456
- and the end result should be: im eating now

I hope I explained it clearly
If you can help me I will be very grateful
Reply


Messages In This Thread
Convert VBA to Python - by uservaf - Sep-13-2019, 03:18 PM
RE: Convert VBA to Python - by ichabod801 - Sep-13-2019, 03:29 PM
RE: Convert VBA to Python - by uservaf - Sep-13-2019, 03:33 PM
RE: Convert VBA to Python - by jefsummers - Sep-13-2019, 08:20 PM
RE: Convert VBA to Python - by uservaf - Sep-13-2019, 09:06 PM
RE: Convert VBA to Python - by jefsummers - Sep-13-2019, 10:13 PM
RE: Convert VBA to Python - by uservaf - Sep-14-2019, 07:06 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020