I have the following code

```
declare
l_clob       clob;
l_line       varchar2(32767);
l_field      varchar2(32767);
l_line_start  pls_integer := 1;
l_line_end    pls_integer := 1;
l_field_start pls_integer := 1;
l_field_end   pls_integer := 1;
begin
   select response_clob
   into   l_clob
   from   xxhr.xxhr_web_service_response
   where  response_id = 290;
   -- Loop through lines.
   loop
      l_line_end := dbms_lob.instr(l_clob, chr(10), l_line_start, 1);
      l_line := dbms_lob.substr(l_clob, l_line_end - l_line_start + 1, l_line_start);
      -- If this is a line with fields and not web service garbage.
      if substr(l_line, 1, 1) = '"' then
         l_field_start := 2;
         -- Loop through fields.      
         loop
            l_field_end := instr(l_line, chr(9), l_field_start, 1);
            l_field := substr(l_line, l_field_start, l_field_end - l_field_start);  
            dbms_output.put(l_field || ',');
            l_field_start := l_field_end + 1;
            exit when l_field_end = 0;
         end loop;
         dbms_output.put_line('');         
      end if;   
      l_line_start := l_line_end + 1;
      exit when l_line_end = 0;
   end loop;
end;   

```

with which I'm trying to parse this `clob` test data:

```
﻿LINE_TEXT
"PERSON_ID_NUMBER   30000   1223445454"
"PERSON_DOB 30000   01-01-1900"

```

The `clob` data is `tab` separated and has a `chr(10)` at the end. I'm not familiar with `regexp_instr`, but currently I'm only using `instr` to search for the `tab` separators; so it's missing the end of line field and producing:

```
PERSON_ID_NUMBER,30000,,
PERSON_DOB,30000,,

```

How can I change the `instr` into a `regexp_instr` to also look for the end of line character in addition to the `tab` and then correctly pick up the last field?

I need the function to be performant, since it is parsing large files.
['https://Stackoverflow.com/questions/56803873', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/941397/']
To delete a file from a zip file, try this. I am demonstrating on how to delete one file. Feel free to amend it to suit your needs

**Logic:**

1. Use `.MoveHere` to move the file to user's temp directory. This will remove the file from the zip file
2. Delete the file from the temp directory

**Code: (Tried and Tested)**

```
Option Explicit

Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" _
(ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long

Private Const MAX_PATH As Long = 260

Sub Sample()
    Dim zipFile, oShellApp, fileToDelete, fl

    zipFile = "C:\Users\routs\Desktop\Desktop.zip"
    fileToDelete = "Tester.xlsm"

    Set oShellApp = CreateObject("Shell.Application")

    For Each fl In oShellApp.Namespace(zipFile).Items
        If fl.Name = fileToDelete Then
            oShellApp.Namespace(TempPath).MoveHere (fl)
        End If
    Next fl

    Kill TempPath & fileToDelete
End Sub

'~~> Function to get the user's temp path
Function TempPath() As Variant
    TempPath = String$(MAX_PATH, Chr$(0))
    GetTempPath MAX_PATH, TempPath
    TempPath = Replace(TempPath, Chr$(0), "")
End Function

```

**Alternative**

1. Add all relevant files to the zip
2. After that in a loop check the file size and if it is within acceptable limits, add optional files one by one.
Using the Hints from above answer by Siddharth. This little piece of code worked.

**Fortunately you can pass path of a folder inside the Zip to `NameSpace` directly and loop through it's files.**

Using path as `C:\-----\Test.Zip\Folder\Folder`

So this worked Beautifully.

```
Dim oApp As Object
Dim fl As Object
Set oApp = CreateObject("Shell.Application")

    For Each fl In oApp.Namespace("C:\Users\mohit.bansal\Desktop\Test\Test.zip\Test\Password Removed Files").items 
    'Path to a folder inside the Zip
        oApp.Namespace("C:\Users\mohit.bansal\Desktop\Test\abc\").MoveHere (fl.Path)
    Next

```