Jump to content

m1975michael

Active Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by m1975michael

  1. I am backup computers with this script and using LanDesk to run the script. I needs to run the script with the system account so I do not have to worry about if a user is logged in to the system and has proper permissions.
  2. I am trying to map a drive with credentials in Windows XP with the systems account. The following is my line of code. $sIPAddress = "10.10.28.230" DriveMapAdd("z:", "\\" & $sIPAddress & "\backups", 0, "admin", "password") It will map running under a non systems account but not under the systems account. This code works correctly under Windows 7 using the systems account. If you have any suggestions it would be greatly appreciated. Thank you.
  3. There are certain commands that don't work when you are not in an interactive session. ie Task Scheduler job but using third partly software. I can't "open" a command window and send commands when the session is not interactive. A batch file allow the commands to be executed without opening command window.
  4. The script opens the batch file, modifies the first line then closed the file. Then batch file is executed. The script works fine if I don't modify the batch file but it is necessary to modify the batch file because each of the location IP addresses are different. I am not sure why it should make a difference as I am opening, modifying and closing the file before the execution of the batch file. Any ideas?
  5. I have been writing a script to backup computers. Part of the script requires running a batch file as eventually it will be a scheduled job in Windows. The script works unless I modify the batch file during the running of the script. The only thing I am changing is line one in the batch file so that it reflects a proper IP address for that location. I do not understand why this is not working any suggestions would be greatly appreciated. The flowing is the script. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=AdminNASBackup.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Res_Fileversion=0.1.0.0 #AutoIt3Wrapper_Res_SaveSource=y #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;#RequireAdmin #include <File.au3> #include <INet.au3> ;Backup file location Global $sBackupFileLocation = "c:\Backup", $sIPAddressAdmin, $sIPAddressPersonal EmbedBackupFiles() GetLocalIP() ;Get local wired and wireless IP address Call SetNASIP function Func GetLocalIP() Local $sIPLocal = "LocalNotConnected" Local $sIPWireless = "WirelessNotConnected" Local $objWMI = ObjGet("winmgmts:\\.\root\cimv2") Local $colNICs1 = $objWMI.ExecQuery("Select * From Win32_NetworkAdapter WHERE NetConnectionID LIKE 'Local%' AND NetConnectionStatus = '2'") For $objNIC In $colNICs1 Local $colNICcfg = $objWMI.ExecQuery("Select * From Win32_NetworkAdapterConfiguration Where MACAddress = '" & $objNIC.MACAddress & "' AND IPEnabled = 'true'") For $objItem In $colNICcfg $sIPLocal = $objItem.IPAddress(0) If $sIPWireless = "LocalNotConnected" Then ;MsgBox(0, "", "LocalNotConnected") Else ;MsgBox(0, "", $sIPLocal) EndIf Next Next Local $colNICs2 = $objWMI.ExecQuery("Select * From Win32_NetworkAdapter WHERE NetConnectionID LIKE 'Wireless%' AND NetConnectionStatus = '2'") For $objNIC In $colNICs2 $colNICcfg = $objWMI.ExecQuery("Select * From Win32_NetworkAdapterConfiguration Where MACAddress = '" & $objNIC.MACAddress & "' AND IPEnabled = 'true'") For $objItem In $colNICcfg $sIPWireless = $objItem.IPAddress(0) If $sIPWireless = "WirelessNotConnected" Then ;MsgBox(0, "", "WirelessNotConnected") Else ;MsgBox(0, "", $sIPWireless) EndIf Next Next SetNASIP($sIPLocal, $sIPWireless) EndFunc ;==>GetLocalIP ;Set NAS IP address, modify backup scripts and call Backup function Func SetNASIP(ByRef $sIPLocal, ByRef $sIPWireless) Local $sIPAddress Local $sIPO4Admin = ".230" Local $sIPO4Personal = ".225" If $sIPLocal <> "LocalNotConnected" Then $sIPAddress = $sIPLocal ;MsgBox(0, "Local", $sIPAddress) ElseIf $sIPWireless <> "WirelessNotConnected" Then $sIPAddress = $sIPWireless ;MsgBox(0, "Wireless", $sIPAddress) Else Exit EndIf Local $aRet = StringRegExp($sIPAddress, "(\d{1,3})", 3) Local $sIPAddress3Octet = $aRet[0] & "." & $aRet[1] & "." & $aRet[2] $sIPAddressAdmin = $sIPAddress3Octet & $sIPO4Admin $sIPAddressPersonal = $sIPAddress3Octet & $sIPO4Personal Local $sIPAddressAdminPing = Ping($sIPAddressAdmin, 4000) If $sIPAddressAdminPing Then Local $sAdminNASPath = "\\" & $sIPAddressAdmin & "\backups" Local $sAdminBackupFileName = $sAdminNASPath & "\" & @ComputerName & "\" & @ComputerName & "_Backup.bkf" FileOpen($sBackupFileLocation & "\runBackupWin7.bat", 1) _FileWriteToLine($sBackupFileLocation & "\runBackupWin7.bat", 1, "pushd " & $sAdminNASPath, 1) FileClose($sBackupFileLocation & "\runBackupWin7.bat") FileOpen($sBackupFileLocation & "\runBackupWinXP.bat", 1) _FileWriteToLine($sBackupFileLocation & "\runBackupWinXP.bat", 1, "pushd " & $sAdminNASPath, 1) FileClose($sBackupFileLocation & "\runBackupWinXP.bat") Backup() ;ReportStatusUpAdmin($sAdminBackupFileName) Else Local $sIPAddressPersonalPing = Ping($sIPAddressPersonal, 4000) If $sIPAddressPersonalPing Then Local $sPersonalNASPath = "\\" & $sIPAddressPersonal & "\backups" Local $sPersonalBackupFileName = $sPersonalNASPath & "\" & @ComputerName & "\" & @ComputerName & "_Backup.bkf" FileOpen($sBackupFileLocation & "\runBackupWin7.bat", 1) _FileWriteToLine($sBackupFileLocation & "\runBackupWin7.bat", 1, "pushd " & $sPersonalNASPath, 1) FileClose($sBackupFileLocation & "\runBackupWin7.bat") FileOpen($sBackupFileLocation & "\runBackupWinXP.bat", 1) _FileWriteToLine($sBackupFileLocation & "\runBackupWinXP.bat", 1, "pushd " & $sPersonalNASPath, 1) FileClose($sBackupFileLocation & "\runBackupWinXP.bat") Backup() ReportStatusUpPersonal($sPersonalBackupFileName) Else ReportStatusDown() Exit EndIf EndIf EndFunc ;==>SetNASIP ;Execute backup scripts based on operating systems. Func Backup() BackupExclusions() If @OSVersion = "WIN_7" Then Run("runBackupWin7.bat") ElseIf @OSVersion = "Win_XP" Then Run("runBackupWinXP.bat") EndIf Exit EndFunc ;==>Backup Func ReportStatusDown() RegWrite("HKEY_LOCAL_MACHINE\Software\CED\NASBackup", "NASstatus", "REG_SZ", "Down") RegWrite("HKEY_LOCAL_MACHINE\Software\CED\NASBackup", "BackupFileName", "REG_SZ", "Unknown") EndFunc ;==>ReportStatusDown Func ReportStatusUpAdmin(ByRef $sAdminBackupFileName) RegWrite("HKEY_LOCAL_MACHINE\Software\CED\NASBackup", "NASstatus", "REG_SZ", "Up") RegWrite("HKEY_LOCAL_MACHINE\Software\CED\NASBackup", "BackupFileName", "REG_SZ", $sAdminBackupFileName) Local $stime = FileGetTime($sAdminBackupFileName, 0) If Not @error Then Local $dmyyyy = $stime[2] & "/" & $stime[1] & "/" & $stime[0] & " " & $stime[3] & ":" & $stime[4] & ":" & $stime[5] ;MsgBox(0, "Modify date", "Date modified: " & $dmyyyy) EndIf RegWrite("HKEY_LOCAL_MACHINE\Software\CED\NASBackup", "BackupFileDate", "REG_SZ", $dmyyyy) Local $AdminFileSize = FileGetSize($sAdminBackupFileName) RegWrite("HKEY_LOCAL_MACHINE\Software\CED\NASBackup", "BackupFileSize", "REG_SZ", $AdminFileSize & "MB") EndFunc ;==>ReportStatusUpAdmin Func ReportStatusUpPersonal(ByRef $sPersonalBackupFileName) RegWrite("HKEY_LOCAL_MACHINE\Software\CED\NASBackup", "NASstatus", "REG_SZ", "Up") RegWrite("HKEY_LOCAL_MACHINE\Software\CED\NASBackup", "BackupFileName", "REG_SZ", $sPersonalBackupFileName) Local $stime = FileGetTime($sPersonalBackupFileName, 0) If Not @error Then Local $dmyyyy = $stime[2] & "/" & $stime[1] & "/" & $stime[0] & " " & $stime[3] & ":" & $stime[4] & ":" & $stime[5] ;MsgBox(0, "Modify date", "Date modified: " & $dmyyyy) EndIf RegWrite("HKEY_LOCAL_MACHINE\Software\CED\NASBackup", "BackupFileDate", "REG_SZ", $dmyyyy) Local $PersonalFileSize = FileGetSize($sPersonalBackupFileName) RegWrite("HKEY_LOCAL_MACHINE\Software\CED\NASBackup", "BackupFileSize", "REG_SZ", $PersonalFileSize & "MB") EndFunc ;==>ReportStatusUpPersonal ;Add backup exclusions and disable removable storage device not found settings into the registry Func BackupExclusions() RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup", "LANDeskBackupExclusions", "REG_MULTI_SZ", "C:\*mp3 /s" & @CRLF & "C:\*mp4 /s" & @CRLF & "C:\*m4v /s" & @CRLF & "C:\*pst /s" & @CRLF & "C:\*ost /s" & @CRLF) RegWrite("HKEY_USERS\S-1-5-18\Software\Microsoft\Ntbackup", "Dont Show MS Warning", "REG_QWORD", 00000001) RegWrite("HKEY_USERS\.DEFAULT\Software\Microsoft\Ntbackup", "Dont Show MS Warning", "REG_QWORD", 00000001) ;MsgBox(0, "", @error) EndFunc ;==>BackupExclusions ;Embed backup files into script and extract backup files to c:\Backup upon execution Func EmbedBackupFiles() If Not FileExists("c:\Backup") Then DirCreate("c:\Backup") EndIf FileChangeDir("c:\Backup") Local $ntbackup = "C:\Backup\ntbackup.exe" Local $ntmsapi = "C:\Backup\Orgntmsapi.dll" Local $runBackup = "C:\Backup\runBackup.bat" Local $selections = "C:\Backup\selections.bks" Local $vssapi = "C:\Backup\vssapi.dll" If FileExists($ntbackup And $ntmsapi And $runBackup And $selections And $vssapi) Then Return Else FileInstall("C:\BackupOrg\ntbackup.exe", @WorkingDir & "\") FileInstall("C:\BackupOrg\ntmsapi.dll", @WorkingDir & "\") FileInstall("C:\BackupOrg\runBackupWinXP.bat", @WorkingDir & "\") FileInstall("C:\BackupOrg\runBackupWin7.bat", @WorkingDir & "\") FileInstall("C:\BackupOrg\selectionsWinXP.bks", @WorkingDir & "\") FileInstall("C:\BackupOrg\selectionsWin7.bks", @WorkingDir & "\") FileInstall("C:\BackupOrg\vssapi.dll", @WorkingDir & "\") EndIf FileCopy(@WorkingDir, "C:\Backup\") EndFunc ;==>EmbedBackupFiles The following is an example of the batch file only line one is changed in the script. pushd \\10.99.232.230\backups c: cd\backup ntbackup backup "@C:\Backup\selectionsWin7.bks" /j "Admin NAS Backup" /m copy /f "z:\%COMPUTERNAME%\%COMPUTERNAME%_Backup.bkf" /r:yes /SNAP:off popd z:
  6. Much better thank you. I was really stuck.
  7. #include <INet.au3> Local $sIPAddress = @IPAddress1 ;Local $sIPAddress = "100.20.30.40" Local $sIPAddress3 = StringRegExpReplace($sIPAddress, "^(\d{2,3}\.)(\d{2,3}\.)(\d{2,3}\.)(\d{2,3})", "$1$2$3") MsgBox(0, "", "'" & $sIPAddress3 & "'") I am having issues getting the expected results from StringRegEx when passing @IPAddress1 into the function. The expected result would be the first 3 octets. When I just use Local $sIPAddress = "100.20.30.40" I receive the expected results, 100.20.30 @IPAddress is a string based on the IsString() function. Any suggestions would be very grateful.
  8. Is there a better way to write the script with out making those variables global? i have tried but failed.
  9. Is there a better way to write the script with out making those variables global? i have tried but failed.
  10. I want to process the following as long as the box is not empty. I really want to only accept 4 digit number.
  11. Please review my code and see if there are any changes you suggest. Is there a good way to get the script to work with out defining the local variables in the while loop. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=CEDUtilv3.2Personal.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Res_Fileversion=3.2 #AutoIt3Wrapper_Res_SaveSource=y #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <WinAPI.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiIPAddress.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Global $hCEDForm = GUICreate("CED Help Desk Utility", 443, 274, 242, 160) GUISetBkColor(0xA6CAF0) Global $hPCTools = GUICtrlCreateGroup("Profit Center Tools", 24, 16, 185, 241) Global $hLabelPCNum = GUICtrlCreateLabel("PC Number", 40, 40, 58, 17) Global $hPCNumInput = GUICtrlCreateInput("", 40, 59, 31, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER)) GUICtrlSetLimit(-1, 4) Global $hButtonCheckBoxStatus = GUICtrlCreateButton("Execute Checked Items", 40, 212, 125, 25) Global $hCheckboxPingPC = GUICtrlCreateCheckbox("Ping PC Gateway", 40, 92, 115, 25) Global $hCheckboxFortiWiFiWeb = GUICtrlCreateCheckbox("Forti WiFi Web Login", 40, 122, 115, 25) Global $hCheckboxFortiWiFiPutty = GUICtrlCreateCheckbox("Forti WiFi Putty Login", 40, 152, 115, 25) Global $hCheckboxRDCEDSvr = GUICtrlCreateCheckbox("Remote Desktop CED Server", 40, 182, 155, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $hLableNetworkTools = GUICtrlCreateGroup("Network Tools", 232, 16, 185, 241) Global $hButtonPingIPInput = GUICtrlCreateButton("Ping IP Address", 248, 122, 125, 25) Global $hCheckboxClearIP = GUICtrlCreateCheckbox("Clear IP After Execution", 248, 92, 127, 25) Global $hLabelIPAddress = GUICtrlCreateLabel("IP Address", 248, 40, 58, 17) Global $hIPAddressInput = GUICtrlCreateInput("", 248, 59, 105, 21) GUICtrlSetLimit(-1, 15) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Local $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hButtonPingIPInput ;PingIPInput() Case $hButtonCheckBoxStatus Local $iIPO2 Local $iIPO3 Local $iIPAddress GetPCNumber($iIPO2, $iIPO3) CheckBoxStatus() EndSwitch Local $aCursorInfo = GUIGetCursorInfo($hCEDForm) If $aCursorInfo[2] Then If $aCursorInfo[4] = $hPCNumInput Then GUICtrlSetData($hPCNumInput, "") EndIf WEnd _WinAPI_SetFocus(ControlGetHandle("CED Help Desk Utility", "", $hPCNumInput)) ;Profit Center Tools ---------- ;Ping PC Gateway Func PingPCGateway() Local $iIPO1 = 10 Local $iIPO4 = 1 IPAddress($iIPO1, $iIPO4, $iIPAddress) If $iIPO2 = 0 Then Return EndIf PingCmd($iIPO1, $iIPO4) EndFunc ;==>PingPCGateway ;Combine IP Address Octets Func IPAddress($iIPO1, $iIPO4, ByRef $iIPAddress) $iIPAddress = ($iIPO1 & "." & $iIPO2 & "." & $iIPO3 & "." & $iIPO4) EndFunc ;==>IPAddress ;Ping Command Func PingCmd($iIPO1, $iIPO4) Run(@ComSpec & " /k" & "ping.exe -t " & $iIPAddress) EndFunc ;==>PingCmd ;Extrapolate Second and Third Octet From PC Number Func GetPCNumber(ByRef $iIPO2, ByRef $iIPO3) Local $iPCNumber = GUICtrlRead($hPCNumInput) If $iPCNumber > "" Then $iIPO2 = StringRegExpReplace($iPCNumber, "\d{2}$", "") If $iIPO2 = 0 Then MsgBox(262160, "Invalid Entry", "Please Enter a Valid Four Digit PC Number") _WinAPI_SetFocus(ControlGetHandle("CED Help Desk Utility", "", $hPCNumInput)) GUICtrlSetData($hPCNumInput, "") EndIf $iIPO3 = StringRegExpReplace($iPCNumber, "^\d{2}", "") If StringTrimRight($iIPO2, 1) = 0 Then $iIPO2 = StringTrimLeft($iIPO2, 1) EndIf If StringTrimRight($iIPO3, 1) = 0 Then $iIPO3 = StringTrimLeft($iIPO3, 1) EndIf If $iIPO3 = 0 Then $iIPO3 = 100 EndIf ;MsgBox(0, "", $iIPO2) ;MsgBox(0, "", $iIPO3) ElseIf $iPCNumber = "" Then MsgBox(262160, "Invalid Entry", "Please Enter a Valid Four Digit PC Number") _WinAPI_SetFocus(ControlGetHandle("CED Help Desk Utility", "", $hPCNumInput)) EndIf EndFunc ;==>GetPCNumber ;Check Check Box Status For PC Tools Func CheckBoxStatus() Local $iPCNumber = GUICtrlRead($hPCNumInput) If $iPCNumber = "" Then Return Else Local $CheckboxPingPCStatus = ControlCommand($hCEDForm, "", $hCheckboxPingPC, "IsChecked") Local $CheckboxFortiWiFiWebStatus = ControlCommand($hCEDForm, "", $hCheckboxFortiWiFiWeb, "IsChecked") Local $CheckboxFortiWiFiPuttyStatus = ControlCommand($hCEDForm, "", $hCheckboxFortiWiFiPutty, "IsChecked") Local $hCheckboxRDCEDSvrStatus = ControlCommand($hCEDForm, "", $hCheckboxRDCEDSvr, "IsChecked") If $CheckboxPingPCStatus = 1 Then PingPCGateway() EndIf If $CheckboxFortiWiFiWebStatus = 1 Then ;FortiWiFiWebLogin() EndIf If $CheckboxFortiWiFiPuttyStatus = 1 Then ;FortiWiFiPuttyLogin() EndIf If $hCheckboxRDCEDSvrStatus = 1 Then ;RDCEDSvr() EndIf EndIf EndFunc ;==>CheckBoxStatus
  12. I am not sure how to do that can you please show me.
  13. How can I get $iIPO2 and $iIPO3 values from the GetPCNumber function into the PingPCGateway function? PingPCGateway() ;Ping PC Gateway Func PingPCGateway() GetPCNumber() MsgBox(0, "", $iIPO2 & " " & $iIPO3) Local $iIPO1 = 10 Local $iIPO4 = 1 Local $iIPAddress = ($iIPO1 & "." & $iIPO2 & "." & $iIPO3 & "." & $iIPO4) Run(@ComSpec & " /k" & "ping.exe -t " & $iIPAddress) EndFunc ;==>PingPCGateway ;Extrapolate Second and Third Octet From PC Number Func GetPCNumber() Local $iPCNumber = InputBox("Enter PC Number", "Enter a 4 digit PC Number") If $iPCNumber > "" Then Local $iIPO2 = StringRegExpReplace($iPCNumber, "\d{2}$", "") Local $iIPO3 = StringRegExpReplace($iPCNumber, "^\d{2}", "") If StringTrimRight($iIPO2, 1) = 0 Then $iIPO2 = StringTrimLeft($iIPO2, 1) EndIf If StringTrimRight($iIPO3, 1) = 0 Then $iIPO3 = StringTrimLeft($iIPO3, 1) EndIf If $iIPO3 = 0 Then $iIPO3 = 100 EndIf ElseIf $iPCNumber = "" Then MsgBox(262160, "Invalid Entry", "Please Enter a Valid Four Digit PC Number") EndIf ;MsgBox(0, "", $iIPO2) ;MsgBox(0, "", $iIPO3) EndFunc ;==>GetPCNumber
  14. I do not mind rewriting the scripts into one but i need some assistance as i do not know how to go about it especially with the menu system. I also need assistance getting rid of the global variables. I am still learning scripting so any examples would be great. Thank you.
  15. I have attached two of my scripts. Thank you. CEDUtilv3.1.au3 AdminNASUtil.au3
  16. I have written several small GUI scripts that I would like to now combine into one program. I need some direction how to create a menu system that will display each scripts GUI separately but also remove the previous scripts GUI when selecting a different script. I appreciate any assistance. Thank You.
  17. I have another Regex question separate from the one previous. The following is what I have come up with so far for the regex expression. I would like to delete all text except the title and the ID or copy the title and ID into a separate file. I am not sure how to delete all of the other text or copy just the title and ID information. I have several files that I would like to open and perform this same task. The files are different so I can't just make a template replace text or copy the text. $res = StringRegExpReplace($sDir, "(<title>)(.*)(<\/title>)|(<id>)(.*)(<\/id>)", "\2 \5") <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <movie> <fileinfo> <streamdetails> <video> <width>320</width> <height>240</height> <aspect>1.33</aspect> <codec>WMV2</codec> <durationinseconds>48</durationinseconds> <bitrate>185 Kbps</bitrate> <bitratemode>Constant</bitratemode> <container>.mkv</container> </video> <audio> <language>Error</language> <codec>WMA</codec> <channels>2</channels> <bitrate>40.0 Kbps</bitrate> </audio> </streamdetails> </fileinfo> <title>16 Blocks</title> <originaltitle>16 Blocks</originaltitle> <alternativetitle>16 calles</alternativetitle> <alternativetitle>16 blocs</alternativetitle> <alternativetitle>16 Quadras</alternativetitle> <alternativetitle>16 rues</alternativetitle> <alternativetitle>16 calles</alternativetitle> <alternativetitle>16 blocs</alternativetitle> <alternativetitle>16 blokova</alternativetitle> <alternativetitle>16 utca</alternativetitle> <alternativetitle>16 Rehovot</alternativetitle> <alternativetitle>Solo 2 ore</alternativetitle> <alternativetitle>16 kvartalu</alternativetitle> <alternativetitle>16 przecznic</alternativetitle> <alternativetitle>16 blokova</alternativetitle> <alternativetitle>16 blok</alternativetitle> <alternativetitle>Sixteen Blocks</alternativetitle> <alternativetitle>Muerte súbita</alternativetitle> <sorttitle>16 Blocks</sorttitle> <year>2006</year> <premiered>2006-03-03</premiered> <rating>6.6</rating> <votes>97,478</votes> <top250>0</top250> <outline>An aging cop is assigned the ordinary task of escorting a fast-talking witness from police custody to a courthouse. There are however forces at work trying to stop prevent them from making it.</outline> <plot>Jack Mosley, a burnt-out detective, is assigned the unenviable task of transporting a fast-talking convict from jail to a courthouse 16 blocks away. However, along the way he learns that the man is supposed to testify against Mosley's colleagues, and the entire NYPD wants him dead. Mosley must choose between loyalty to his colleagues and protecting the witness, and never has such a short distance seemed so long...</plot> <tagline>1 Witness... 118 Minutes...</tagline> <country>Germany</country> <thumb aspect="poster">http://image.tmdb.org/t/p/original/wpKBLDjNRddmH6N32ni4bASogt8.jpg</thumb> <thumb aspect="poster">http://image.tmdb.org/t/p/original/50L7MaiHGWoEmrd1Gfy3GsBi39Y.jpg</thumb> <thumb aspect="poster">http://image.tmdb.org/t/p/original/foCWsNPMWwZWqPVSIHdydA3bGBT.jpg</thumb> <thumb aspect="poster">http://image.tmdb.org/t/p/original/31xr6dXups2uGC9VwCHBIq6klCp.jpg</thumb> <thumb aspect="poster">http://image.tmdb.org/t/p/original/zYAc8S0DzeJ1USQcj4F9bJ34Bbr.jpg</thumb> <thumb aspect="poster">http://image.tmdb.org/t/p/original/pl6LEL7MvgwXwls9TgmsVASvWx4.jpg</thumb> <thumb aspect="poster">http://image.tmdb.org/t/p/original/b7Rwwc49fOayNJKIOSerNZGo1pq.jpg</thumb> <fanart url=""> <thumb dim="" colors="" preview="http://image.tmdb.org/t/p/w1280/31SqCV9NfHvGJ8n7v60fV3oMobZ.jpg">http://image.tmdb.org/t/p/original/31SqCV9NfHvGJ8n7v60fV3oMobZ.jpg</thumb> <thumb dim="" colors="" preview="http://image.tmdb.org/t/p/w1280/hitJYC22IELrPPdHnSzTX4NK9Be.jpg">http://image.tmdb.org/t/p/original/hitJYC22IELrPPdHnSzTX4NK9Be.jpg</thumb> <thumb dim="" colors="" preview="http://image.tmdb.org/t/p/w1280/inpj4qYEs9LlljCy2tjw5aMkSFg.jpg">http://image.tmdb.org/t/p/original/inpj4qYEs9LlljCy2tjw5aMkSFg.jpg</thumb> <thumb dim="" colors="" preview="http://image.tmdb.org/t/p/w1280/u0lGvteH5bmAs2QO2EmLD3wQ5Bt.jpg">http://image.tmdb.org/t/p/original/u0lGvteH5bmAs2QO2EmLD3wQ5Bt.jpg</thumb> </fanart> <runtime> </runtime> <mpaa>Rated PG-13 for violence, intense sequences of action, and some strong language</mpaa> <genre>Action</genre> <genre>Crime</genre> <genre>Drama</genre> <genre>Thriller</genre> <credits>Richard Wenk</credits> <director>Richard Donner</director> <studio>Alcon Entertainment, Millennium Films, Emmett/Furla Films</studio> <trailer>http://r16---sn-vgqsen7y.googlevideo.com/videoplayback?expire=1394439980&amp;sver=3&amp;fexp=917000,935503,932103,945008,942701,916612,937417,913434,936910,936913,902907,934022&amp;id=e4539a053c507d11&amp;ms=au&amp;mt=1394415658&amp;itag=22&amp;ipbits=0&amp;ratebypass=yes&amp;source=youtube&amp;sparams=id,ip,ipbits,itag,ratebypass,source,upn,expire&amp;mv=m&amp;signature=952529B5F937A521AB9D30443DB45A9D674F99CD.2A505BDD41E475AE13B144C8D1A93E6A408D0746&amp;upn=VBRbSV9guS4&amp;ip=172.4.205.60&amp;key=yt5&amp;fallback_host=tc.v11.cache4.googlevideo.com&amp;signature=</trailer> <playcount>0</playcount> <lastplayed> </lastplayed> <id>tt0450232</id> <createdate>20140309214134</createdate> <stars>Bruce Willis, Mos Def, David Morse</stars> <actor> <name>Bruce Willis</name> <role>Det. Jack Mosley</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMjA0MjMzMTE5OF5BMl5BanBnXkFtZTcwMzQ2ODE3Mw@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Mos Def</name> <role>Eddie Bunker</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMjE4NTYzODcxN15BMl5BanBnXkFtZTcwNTg3MTEwNw@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>David Morse</name> <role>Det. Frank Nugent</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTgwNjUzOTE1N15BMl5BanBnXkFtZTYwNTU4NDQ0._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Jenna Stern</name> <role>Diane Mosley</role> <thumb>http://ia.media-imdb.com/images/M/MV5BNzQwNDgyMDI1MF5BMl5BanBnXkFtZTcwNjcyMzUxOA@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Casey Sander</name> <role>Capt. Dan Gruber</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTU1MDI2Mzg0MV5BMl5BanBnXkFtZTcwMjYyMjk1Mw@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Cylk Cozart</name> <role>Det. Jimmy Mulvey</role> <thumb> </thumb> </actor> <actor> <name>David Zayas</name> <role>Det. Robert Torres</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMjA5NTkwMTg1N15BMl5BanBnXkFtZTcwNzU2ODE3Mw@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Robert Racki</name> <role>Det. Jerry Shue</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTMxMzQ2NjU1OF5BMl5BanBnXkFtZTcwMTYzMDgyMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Patrick Garrow</name> <role>Touhey</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMjA2NDI4ODExOF5BMl5BanBnXkFtZTcwMjUzOTgwNA@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Sasha Roiz</name> <role>Kaller</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMjA1NTE2MTE5Ml5BMl5BanBnXkFtZTcwOTQ2MDE1OA@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Conrad Pla</name> <role>Ortiz</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTk4NzkzNjcwMF5BMl5BanBnXkFtZTcwNDM3MjM0NQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Hechter Ubarry</name> <role>Maldonado</role> <thumb> </thumb> </actor> <actor> <name>Richard Fitzpatrick</name> <role>Deputy Commissioner Wagner</role> <thumb>http://ia.media-imdb.com/images/M/MV5BNDM1ODIxNDI4M15BMl5BanBnXkFtZTgwNTAxMTUyMTE@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Peter McRobbie</name> <role>Mike Sheehan</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTgyMTU1MzcwNV5BMl5BanBnXkFtZTcwOTIwMTUyOA@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Michael F. Keenan</name> <role>Ray Fitzpatrick</role> <thumb> </thumb> </actor> <actor> <name>Robert Clohessy</name> <role>Cannova</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTk3MTg1ODExMl5BMl5BanBnXkFtZTcwODY2NDIzMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Jess Mal Gibbons</name> <role>Pederson</role> <thumb> </thumb> </actor> <actor> <name>Tig Fong</name> <role>Briggs</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTYyOTI2NzM5Ml5BMl5BanBnXkFtZTcwNzAzNTYyMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Brenda Pressley</name> <role>ADA MacDonald</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTAxNzQ1OTg0NTJeQTJeQWpwZ15BbWU3MDM2OTY0Mzc@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Kim Chan</name> <role>Sam</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTgzMjY3NjI2Nl5BMl5BanBnXkFtZTcwNDU2MzUzMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Carmen López</name> <role>Gracie</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTc4NTkzNjUxOV5BMl5BanBnXkFtZTcwNzM2OTUyMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Scott McCord</name> <role>Lieutenant Kincaid</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTcyMDMxNzM3OV5BMl5BanBnXkFtZTcwMDY3MDMwOQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>David Sparrow</name> <role>Holding Cell Officer</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTIwODM0NTYwNV5BMl5BanBnXkFtZTcwOTk1MTAzMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Eduardo Gomez</name> <role>Holding Cell Prisoner</role> <thumb> </thumb> </actor> <actor> <name>Sam Kung</name> <role>Chinese Man</role> <thumb> </thumb> </actor> <actor> <name>Angela Seto</name> <role>Chinese Wife</role> <thumb> </thumb> </actor> <actor> <name>Bernie Henry</name> <role>Man with Caddy</role> <thumb> </thumb> </actor> <actor> <name>Nick Alachiotis</name> <role>Russian</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTU1NzcxNDkxOF5BMl5BanBnXkFtZTcwMTgzMjI5MQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Danny Lima</name> <role>Russian</role> <thumb>http://ia.media-imdb.com/images/M/MV5BNTYwNjUxMDkxM15BMl5BanBnXkFtZTcwNjA2NDgyMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Claudio Masciulli</name> <role>Dominic Forlini</role> <thumb> </thumb> </actor> <actor> <name>Efosa Otuomagie</name> <role>Bus Driver</role> <thumb> </thumb> </actor> <actor> <name>Christina Orjalo</name> <role>Little Girl on the Bus</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTQ2MTA3MTA3Ml5BMl5BanBnXkFtZTgwODkwNjEzMTE@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Richard Wenk</name> <role>ADA's Detective</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTM5MDE4NDc4M15BMl5BanBnXkFtZTYwMDk4NDQ0._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Derek Hoffman</name> <role>Carl - EMT</role> <thumb> </thumb> </actor> <actor> <name>Brian Read</name> <role>UPS Delivery Man</role> <thumb> </thumb> </actor> <actor> <name>Ryan Wulff</name> <role>DA'S Clerk</role> <thumb> </thumb> </actor> <actor> <name>Steve Kahan</name> <role>Restaurant Owner</role> <thumb> </thumb> </actor> <actor> <name>Paul Tuerpe</name> <role>Diane's Boyfriend</role> <thumb> </thumb> </actor> <actor> <name>Cece Neber Labao</name> <role>Restaurant Waitress</role> <thumb> </thumb> </actor> <actor> <name>Jim Chong</name> <role>Bus Passenger</role> <thumb> </thumb> </actor> <actor> <name>Betty Chong</name> <role>Bus Passenger</role> <thumb> </thumb> </actor> <actor> <name>Sam Moses</name> <role>Bus Passenger</role> <thumb> </thumb> </actor> <actor> <name>Kathy Imrie</name> <role>Bus Passenger</role> <thumb> </thumb> </actor> <actor> <name>Jason Burke</name> <role>Bus Passenger</role> <thumb> </thumb> </actor> <actor> <name>Tom Wlaschiha</name> <role>Bus Passenger</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMjMyMjg4NzgzN15BMl5BanBnXkFtZTgwMzEzMzUwMTE@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Scott Douglas</name> <role>Bus Passenger</role> <thumb> </thumb> </actor> <actor> <name>J.D. Nicholsen</name> <role>Man in Gray Suit</role> <thumb> </thumb> </actor> <actor> <name>Kameron Louangxay</name> <role>Communications Tech</role> <thumb>http://ia.media-imdb.com/images/M/MV5BNDQ0MTY2MDEzMF5BMl5BanBnXkFtZTcwNTYwNjQzMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Victoria Mitchell</name> <role>Woman in Apartment</role> <thumb> </thumb> </actor> <actor> <name>Cecil Phillips</name> <role>MTA Cop</role> <thumb> </thumb> </actor> <actor> <name>Rob Wiethoff</name> <role>Court Officer</role> <thumb> </thumb> </actor> <actor> <name>Jimmy Campbell</name> <role>Court Officer</role> <thumb> </thumb> </actor> <actor> <name>Richard Collier</name> <role>Court Officer</role> <thumb> </thumb> </actor> <actor> <name>Aaron Ferguson</name> <role>Court Officer</role> <thumb> </thumb> </actor> <actor> <name>Bradley Paterson</name> <role>Brad - EMT</role> <thumb> </thumb> </actor> <actor> <name>Paul J.Q. Lee</name> <role>Asian Store Owner</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTE5MjM3ODk0Nl5BMl5BanBnXkFtZTYwNjgyMjcy._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Heather Dawn</name> <role>The Juror</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTg0NTkwMzc5M15BMl5BanBnXkFtZTYwMTE3MDgy._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Daryl Dismond</name> <role>Man in Suit</role> <thumb> </thumb> </actor> <actor> <name>Jim Lavin</name> <role>Car Key Detective</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTI4ODY2NzA3OF5BMl5BanBnXkFtZTYwMzcxNzgy._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Beatriz Yuste</name> <role>Subway Commuter</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTg1MzAwODExN15BMl5BanBnXkFtZTcwNTMyMjY2Ng@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>David Talbolt</name> <role>Subway Commuter</role> <thumb> </thumb> </actor> <actor> <name>Toni Ellwand</name> <role>Subway Commuter</role> <thumb> </thumb> </actor> <actor> <name>Rolando Alvarez Giacoman</name> <role>Subway Commuter</role> <thumb> </thumb> </actor> <actor> <name>Brian G. Andersson</name> <role>Detective</role> <thumb> </thumb> </actor> <actor> <name>Robert Bizik</name> <role>Construction Worker</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMjMwNTc0NjI2OV5BMl5BanBnXkFtZTcwNjQ0NTMxNw@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Ed Cuffe</name> <role>Pedestrian</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTQxOTgwNTU2MV5BMl5BanBnXkFtZTcwNzQ3MTg1MQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Joseph DeBona</name> <role>Detective</role> <thumb> </thumb> </actor> <actor> <name>Richard Donner</name> <role>Man Holding a Birthday Cake</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTQ0NzA2NjQzNl5BMl5BanBnXkFtZTYwNzg4NDQ0._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Albert Duic</name> <role>Paramedic</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTc1NDI1OTM5M15BMl5BanBnXkFtZTgwNTc2MTY4MDE@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Marshall Factora</name> <role>Juror</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTkwMzMxMjYyOV5BMl5BanBnXkFtZTcwNjQ0NTI2NA@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Victor Formosa</name> <role>Businessman</role> <thumb> </thumb> </actor> <actor> <name>Eli Harris</name> <role>Cab Driver</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTQ0NDQyMTcyM15BMl5BanBnXkFtZTcwNTY0NTA4OA@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Alan Lee</name> <role>Subway Commuter</role> <thumb> </thumb> </actor> <actor> <name>Kevin P. McCarthy</name> <role>Person in Cab</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTkyNzQzNzExM15BMl5BanBnXkFtZTcwNjA4NjkzMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Liam McGuckian</name> <role>Nephew</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTI3MjcwMDQ0OF5BMl5BanBnXkFtZTYwMzMzNjYy._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Denis McKeown</name> <role>Pedestrian</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMjAzOTM3NTY5M15BMl5BanBnXkFtZTcwNDg0NTMzMg@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Allison Lee Ritter</name> <role>Passenger</role> <thumb> </thumb> </actor> <actor> <name>Khalid Rivera</name> <role>Pedestrian</role> <thumb> </thumb> </actor> <actor> <name>Joe Rosario</name> <role>Juror #4</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTc4NTI4ODAxNl5BMl5BanBnXkFtZTgwNzA5Nzg0MDE@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Talia Russo</name> <role>Young Bride</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTQ5NTQ3MDEzNl5BMl5BanBnXkFtZTcwOTU2MzEzMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Norman Schleiffer</name> <role>Man in Park Feeding Pidgeons</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTQyODAyNDAxM15BMl5BanBnXkFyZXN1bWU@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Alex Scrymgeour</name> <role>Cop</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTkwMzIyMjQzOV5BMl5BanBnXkFtZTgwODA2MzQxMTE@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Michael Segovia</name> <role>Russian Boy</role> <thumb> </thumb> </actor> <actor> <name>Joseph Siravo</name> <role>District Attorney Haynes</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTc2NDAyODA5M15BMl5BanBnXkFtZTcwMDY3OTE2OA@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Brian Smyj</name> <role>Sniper</role> <thumb>http://ia.media-imdb.com/images/M/MV5BODMwNjYyMzQwNV5BMl5BanBnXkFtZTcwNTEzNDY1Mw@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Jeremy J. Sullivan</name> <role>Court Officer</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTU5ODI4ODM1NV5BMl5BanBnXkFtZTcwMzQxMTAzMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Svetlana Titova</name> <role>Waitress</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTc5Mzc1NTU1M15BMl5BanBnXkFtZTcwNjk0MTI2MQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Joshua Tolby</name> <role>Pedestrian</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTY4ODQ0ODE4MF5BMl5BanBnXkFtZTcwMTUwMzIzMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Schuster Vance</name> <role>Detective</role> <thumb>http://ia.media-imdb.com/images/M/MV5BOTAxOTc3NDUxNF5BMl5BanBnXkFtZTcwMTA4NjcyMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Sonny Vellozzi</name> <role>Pedestrian</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTU0NzIyODM4N15BMl5BanBnXkFtZTcwMDM1MTQ3Mg@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>Emerson Wong</name> <role>Alleyway Chinese Cook</role> <thumb>http://ia.media-imdb.com/images/M/MV5BMTM1MzE0OTY5OF5BMl5BanBnXkFtZTcwNjQ2MTkzMQ@@._V1._SY400_SX300_.jpg</thumb> </actor> <actor> <name>William S. Wong</name> <role>Delivery Man</role> <thumb> </thumb> </actor> </movie>
  18. Company,LocationNo,LocationName,LocationDBA,IsActive,LocationManager,LocationPhoneNo,LocationPhoneExtn,LocationFaxNo,LocationMailingAddress,LocationShippingAddress DDD,9999,Pacific Region,Company Name,Y,LName: FName R.,555-555-5555,&nbsp;,000-000-0000,5555 Westridge Drive<br />Suite 260<br />City<br />IN<br />55555 LocationMailingAddress,LocationShippingAddress 5555 Westridge Drive<br />Suite 260<br />City<br />IN<br />55555 Obviously the data is changed to conceal private info.
  19. First I am fairly new to regular expressions but I am learning. I have a comma delimited file. $res = StringRegExpReplace($res, "^(?:(?<01>[^,\n]+),)(?:(?<02>[^,\n]+),)(?:(?<03>[^,\n]+),)(?:(?<04>[^,\n]+),)(?:(?<05>[^,\n]+),)(?:(?<06>[^,\n]+),)(?:(?<07>[^,\n]+),)(?:(?<08>[^,\n]+),)(?:(?<09>[^,\n]+),)(?<10>[^,\n]+)(\r\n)*$", "\10") The regular expression matches each comma delimited section. The issue I am running into is it only replaces the first line. I see in the help the (?m) is used for multiple lines but I am not sure how to use it properly. Using this http://regex101.com/ website as a test with the global and multiple line options it matches multiple lines. Any assistance would be greatly appreciated. Thank You!
  20. Thank you again mikell. I didn't realize you could replace more than one pattern using one StringRegExpReplace statement. I am just starting to lean RegEx too.
  21. This does work but how can I do multiple replacements without opening and rewriting the file? Thank you for your assistance.
  22. I am not sure how I can use the StringRegExpReplace function with that function.
×
×
  • Create New...