Login | |
|
 |
Regular expression - 8/12/2008 8:17:49 PM
|
|
 |
|
| |
babraha
Posts: 1
Score: 0
Joined: 8/6/2008
Status: offline
|
Hi i am new to VB scripting i am currently trying to automate some tasks for a Configuration management tool called Synergy...my script starts as follows Option Explicit Dim strDate, iDay, iMonth, iYear, strDayMonth, strFilteredDate, strCmdLine, oSh, output, expected_addr,objExec Const sCMD = "c:\windows\system32\cmd.exe /c " '============================== Main Body =============================== strCmdLine = sCMD & "ccm start -d \\vlgwap117caa\ccmdb\cmadmin -nogui -n babraha -pw xxxx -h slgwap117ca -home C:\Documents and Settings\babraha -u C:\temp" 'WScript.Echo strCmdLine Set oSh = CreateObject("WScript.Shell") Set objExec = oSh.Exec(strCmdLine) output = objExec.StdOut.ReadAll the output variable has Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Starting Telelogic Synergy... Removing obsolete file C:\Documents\_ccm_65.adr Telelogic Synergy server starting on host slgwap117ca, using database \\vlgwap117caa\ccmdb\cmadmin Telelogic Synergy Release 6.5.4096 © 1992 - 2007 Copyright Telelogic AB. All Rights Reserved. This software is licensed and not sold. All use of this software is subject to the terms and conditions of the Telelogic AB End User Software License, which should be read carefully. This program is protected by U.S. and international copyright laws as described in the "About Telelogic Synergy" box. RESTRICTED RIGHTS LEGEND/NOTICE Use, duplication or disclosure by the government is subject to the Restricted Rights restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or FAR 52.227-14, Alternate III, subparagraph (g)(3)(i), each clause of current date. Telelogic AB, Malmo, Sweden Telelogic Synergy address is DLGW034241:3374:172.18.37.168 From the above output i would like to extract DLGW034241:3374:172.18.37.168 into a variable expected_addr.. can someone help me do it using regular expressions? Thanks in Advance
< Message edited by babraha -- 8/12/2008 9:01:45 PM >
|
|
| |
|
|
|
|
|