split string by rows

user2706762

I have a string like so:

diverr_daily_report_2013-10-21_02:00:48_diverr_users_20_10_2013csv.csv
diverr_daily_report_2013-10-22_09:10:02_diverr_users_21_10_2013csv.csv

and i want to split it into elements.

output should look like:

[0]diverr_daily_report_2013-10-21_02:00:48_diverr_users_20_10_2013csv.csv
[1]diverr_daily_report_2013-10-22_09:10:02_diverr_users_21_10_2013csv.csv    

i was thinking to use the first and last word as a needle(they never chnage) : "diverr,csv"

what is a good way of doing this?
thanks

Legionar

Just split it by end-of-line:

$result = explode("\r\n", $your_string);

or if Unix, then:

$result = explode("\n", $your_string);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

String split into duplicate rows

From Dev

How to split a [String] into rows?

From Dev

How to split a [String] into rows?

From Dev

Split String into rows Oracle SQL

From Dev

Split string into multiple rows and columns

From Dev

Split string into table with rows (multiple delimeters)

From Dev

Split a string into rows using pure SQLite

From Dev

Dataframe split before a specific string for all rows

From Dev

Dataframe split before a specific string for all rows

From Dev

Split a string up into rows by delimiter in Notepad++

From Dev

Split string into table with rows (multiple delimeters)

From Dev

Split one string into multiple rows (SAS)

From Dev

In AWK, how to split consecutive rows that have the same string as a "record"?

From Dev

How to loop through Pandas DataFrame and split a string into multiple rows

From Dev

Split data string over columns AND rows using VBA

From Dev

VBA script to count string, insert rows, copy row, split cell

From Dev

Split comma separated string table row into separate rows using TSQL

From Dev

SSIS - split each string (incl. NULL) into rows in new table

From Dev

SQL Server : how to split string to columns and rows with 2 delimiters?

From Dev

Split string into defiled length and have it into multiple rows and append space

From Dev

Split a string based on delimiters and insert splits into table as rows

From Dev

SQL Server 2014 - How to split a string with commas into multiple rows?

From Dev

Can't split multi-line string into an array of rows

From Dev

How can I split my user String and arrange them in column and rows given the Split Size?

From Dev

R: split rows into different rows

From Dev

Split String by ","

From Dev

split string with "."

From Dev

Split values into separate rows

From Dev

Postgresql: Split columns into rows

Related Related

  1. 1

    String split into duplicate rows

  2. 2

    How to split a [String] into rows?

  3. 3

    How to split a [String] into rows?

  4. 4

    Split String into rows Oracle SQL

  5. 5

    Split string into multiple rows and columns

  6. 6

    Split string into table with rows (multiple delimeters)

  7. 7

    Split a string into rows using pure SQLite

  8. 8

    Dataframe split before a specific string for all rows

  9. 9

    Dataframe split before a specific string for all rows

  10. 10

    Split a string up into rows by delimiter in Notepad++

  11. 11

    Split string into table with rows (multiple delimeters)

  12. 12

    Split one string into multiple rows (SAS)

  13. 13

    In AWK, how to split consecutive rows that have the same string as a "record"?

  14. 14

    How to loop through Pandas DataFrame and split a string into multiple rows

  15. 15

    Split data string over columns AND rows using VBA

  16. 16

    VBA script to count string, insert rows, copy row, split cell

  17. 17

    Split comma separated string table row into separate rows using TSQL

  18. 18

    SSIS - split each string (incl. NULL) into rows in new table

  19. 19

    SQL Server : how to split string to columns and rows with 2 delimiters?

  20. 20

    Split string into defiled length and have it into multiple rows and append space

  21. 21

    Split a string based on delimiters and insert splits into table as rows

  22. 22

    SQL Server 2014 - How to split a string with commas into multiple rows?

  23. 23

    Can't split multi-line string into an array of rows

  24. 24

    How can I split my user String and arrange them in column and rows given the Split Size?

  25. 25

    R: split rows into different rows

  26. 26

    Split String by ","

  27. 27

    split string with "."

  28. 28

    Split values into separate rows

  29. 29

    Postgresql: Split columns into rows

HotTag

Archive