Network Automation Software
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: If variables first 3 characters are numbers delete all numbers upto the first character.
Topic Summary:
Created On: 10/04/2012 02:51 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 10/04/2012 02:51 AM
User is offline View Users Profile Print this message

Author Icon
n00b (>6 posts)

Posts: 3
Joined: 10/27/2010

Hi i have a variable, for example 001 test - test.jdjd or 001test - test.jdjd
I need to be able to check the variables first 3 characters, and if they are all numbers delete all numbers up to the first character.
Some variables have 4 numbers at the begining and some have 3.Also some have a space after the numbers and some dont.

Please help
This is killing me

Many thanks

 Category Survey
 10/06/2012 06:39 AM
User is offline View Users Profile Print this message

Author Icon
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

I thing a regular expression will do it as below
It takes everything starting at the first character found to be neither a figure nor a space

 Category Survey

Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)

Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
18257 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 6686 on 11/01/2020 at 01:24 AM.
There are currently 1001 guests browsing this forum, which makes a total of 1001 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2021 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog