VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   Scripting (https://forums.vandyke.com/forumdisplay.php?f=14)
-   -   using regex (https://forums.vandyke.com/showthread.php?t=12139)

alecarra 10-27-2015 11:56 AM

using regex
 
on a normal python script i would do "import re" hoewever that is not working when i try to do it on an imported script and it fails with:

SyntaxError

Error: invalid syntax
File:...
Line 10

import re

-----

Here are the first 10 lines of the script.

# $language = "python"
# $interface = "1.0"

# basic collect info for Uninet
# Miguel Valadares

import SecureCRT
#import activestate.py
import sys
import*re

how can i use regex?

thanks,

rtb 10-27-2015 12:31 PM

Hi alecarra,

Thanks for the post.

What version of SecureCRT are you using?

What operating system and version are you using?

What is the purpose of the asterisk in the line below?
import*re

alecarra 10-28-2015 02:42 PM

import re
 
hi, that's a typo when i submitted the question, here's the script



# $language = "python"
# $interface = "1.0"

# basic collect info for Uninet
# Miguel Valadares

import SecureCRT
#import activestate.py
import sys
import*re

i'm using Version 7.3.5 (x64 build 903) on Windows 7

rtb 10-28-2015 06:31 PM

Hi alecarra,

Thanks for the information.

You still have a syntax error in your script. You can't use import*re. You have to use import re.

Does this help to resolve the issue?


All times are GMT -6. The time now is 02:57 AM.