How to find number of each line starting with specific parameter

littlefish

So I'm trying to use the YouTube API to extract some info about each video in a playlist, I've already used to API to get hold of the whole information and I've split it per line , just need to know how to find the number of each line which starts with "videoId" so that I can go from there.

I.B

You can use StartsWith() which return true if the string starts with the value given

List<int> arrayIndex = new List<int>();

for(int i = 0; i < lines.Length; i++)
{
    if (lines[i].StartsWith("videoId"))
    {
        arrayIndex.Add(i);
    }
}

arrayIndex will have the index of each line that started with "videoId"

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to count the number of a specific character in each line?

From Dev

How to find a word in a line starting with a specific string in Notepad++

From Dev

How to find the number of a specific entry for each column in my HTML table?

From Dev

how to find the line number where specific text exists?

From Dev

How to set the plot line at specific starting position?

From Dev

How to match a number separated by space or starting of the line

From Dev

SQL Find the number of orders in each line count

From Dev

Find first occurence of a number in each line of a file

From Dev

How to find in a substring starting at a specific index in Rust?

From Dev

How to find in a substring starting at a specific index in Rust?

From Dev

How to add line number into each line?

From Dev

How to delete a line starting with Specific String but keeping a speific word in that line?

From Dev

Printing the line number of the first occurence of a pattern starting from a specific line number in a file

From Dev

How to copy specific number of characters from each line from one file to another

From Dev

How to find number the number of a specific character in a word?

From Dev

how to pass each shell parameter in new line

From Dev

how to pass each shell parameter in new line

From Dev

How to avoid text highlighting of a string in a line starting with a specific symbol [java]

From Dev

How to join lines not starting with specific pattern to the previous line in UNIX?

From Dev

how to delete a specific line from a file starting a string in php

From Dev

How to remove every line starting with specific string from log file?

From Dev

How to add number to beginning of each line?

From Dev

How to specify number of characters in each line in python?

From Dev

How to count the number of characters on each line in vim?

From Dev

How to number each line in the output using a for loop?

From Dev

How to count the number of appearances of a word in each line

From Dev

How to append number at the beginning of each line [PHP]?

From Dev

Copying specific number of chars on each line of new file (Pascal)

From Dev

Using a Parameter As An IDENTITY starting number

Related Related

  1. 1

    How to count the number of a specific character in each line?

  2. 2

    How to find a word in a line starting with a specific string in Notepad++

  3. 3

    How to find the number of a specific entry for each column in my HTML table?

  4. 4

    how to find the line number where specific text exists?

  5. 5

    How to set the plot line at specific starting position?

  6. 6

    How to match a number separated by space or starting of the line

  7. 7

    SQL Find the number of orders in each line count

  8. 8

    Find first occurence of a number in each line of a file

  9. 9

    How to find in a substring starting at a specific index in Rust?

  10. 10

    How to find in a substring starting at a specific index in Rust?

  11. 11

    How to add line number into each line?

  12. 12

    How to delete a line starting with Specific String but keeping a speific word in that line?

  13. 13

    Printing the line number of the first occurence of a pattern starting from a specific line number in a file

  14. 14

    How to copy specific number of characters from each line from one file to another

  15. 15

    How to find number the number of a specific character in a word?

  16. 16

    how to pass each shell parameter in new line

  17. 17

    how to pass each shell parameter in new line

  18. 18

    How to avoid text highlighting of a string in a line starting with a specific symbol [java]

  19. 19

    How to join lines not starting with specific pattern to the previous line in UNIX?

  20. 20

    how to delete a specific line from a file starting a string in php

  21. 21

    How to remove every line starting with specific string from log file?

  22. 22

    How to add number to beginning of each line?

  23. 23

    How to specify number of characters in each line in python?

  24. 24

    How to count the number of characters on each line in vim?

  25. 25

    How to number each line in the output using a for loop?

  26. 26

    How to count the number of appearances of a word in each line

  27. 27

    How to append number at the beginning of each line [PHP]?

  28. 28

    Copying specific number of chars on each line of new file (Pascal)

  29. 29

    Using a Parameter As An IDENTITY starting number

HotTag

Archive