Thanks in advance
I want to find a certain pattern in re. I tried different combinations and this is where i am at.
Here is the code:
import re
txt = "Suggested Profile(s) : Win7SP1x64, Win7SP0x64, Win2008R2SP1x64, Win7SP1x64_24000, Win2008R2x32, Win7x32"
match = re.findall(r"Win.+64", txt)
if match:
y = match[0]
try:
profiles = y.split(", ")
for profile in profiles:
print(profile)
except Exception:
print("Error")
When I run this, I get the following output:
Win7SP1x64
Win7SP0x64
Win2008R2SP1x64
Win7SP1x64
which is somewhat correct, but it is not showing the complete output. The last word "Win7SP1x64" is not complete, it is "Win7SP1x64_24000" but in output, it only shows till '64'.
Also, i want script to show the words with have '32' as well, not sure how to implement this.