Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-27-2015, 10:56 AM
alecarra alecarra is offline
Registered User
 
Join Date: Oct 2015
Posts: 3
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,
Reply With Quote
  #2  
Old 10-27-2015, 11:31 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,307
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
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 10-28-2015, 01:42 PM
alecarra alecarra is offline
Registered User
 
Join Date: Oct 2015
Posts: 3
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
Reply With Quote
  #4  
Old 10-28-2015, 05:31 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,307
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?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
Reply

Tags
python , regex , scripting


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:32 AM.