Python - Read from multiple files & Regex search pattern in files

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024

Комментарии • 33

  • @chaarut458
    @chaarut458 2 года назад

    you are a savior thank you so much

    • @xtremeExcel
      @xtremeExcel  2 года назад

      Happy to help :-) Stay connected!

  • @scialper
    @scialper Год назад +1

    Thank you!

  • @jyotimoyyi3410
    @jyotimoyyi3410 2 года назад

    Thank u so much sir

  • @harshachimirala6064
    @harshachimirala6064 11 месяцев назад

    Hi Kamal, i just need to search certain list of values/strings across a pandas dataframe and list all the rows maches that particular jobnames along with other columns

  • @SanjeevKumar-dd4sd
    @SanjeevKumar-dd4sd 2 года назад

    I have an csv ,xml ,json and text i want to give a single file path for them can you help me

  • @luc917
    @luc917 3 года назад +2

    Great video. Thanks, helped with some searches on patterns! Look forward to more videos

  • @Daalen03
    @Daalen03 3 года назад +1

    Thank you, this is exactly what I was looking for

  • @andreyfomin7354
    @andreyfomin7354 3 года назад

    thanks!

  • @it_programming6859
    @it_programming6859 3 года назад

    How to write this code using while loop for print multiple files

  • @soumyaav98
    @soumyaav98 2 года назад

    Hi, in a directory there are multiple folders. Each folder has sub folders.
    How do we print the file names in all these sub folders which follow the file path */src/gen/*. This file path pattern can be present anywhere inside any folder or folder.

  • @janakiyeluripati6368
    @janakiyeluripati6368 3 года назад

    Hi,
    I have a df column, where the state info is given in parenthesis. EX: [Col Name]: the object is find in 3 st Mauve (TX).
    How could I extract the state name given in the parenthesis into a separate column for further analysis. Please help?

  • @suhasinik6827
    @suhasinik6827 3 года назад

    Could you please help me with the below
    I have a file with content as below
    Hi :'welcome to python'
    'enjoy learning. Bye '
    I want to read only the contents specified within single quotes in a file and write it in a another file

  • @javiersalas4168
    @javiersalas4168 3 года назад

    how to make it, but with changes, now how to ask the string that the script will find?

  • @vsddkkjjhgrreertyfdserrftyh
    @vsddkkjjhgrreertyfdserrftyh 3 года назад

    Thanks for this video..how can we run one python file by taking different input text file one by one from a folder and save output for individual file in folder.. please help

  • @cheonglily3992
    @cheonglily3992 3 года назад

    Hi, I like to know if i want to read a excel spreadsheet, and have all a pattern like this. INV123456 and add all with this pattern. how can it be done. Thanks for your advise. I think your video is easy to understand.

  • @mknarula
    @mknarula 3 года назад

    How about when the number of files is very large, lets say 1 million?

  • @rewadia123
    @rewadia123 3 года назад

    Hi Kama,
    can you help me to validate a html files, whether all the tags are correct or not ?

  • @kamalpreet101089
    @kamalpreet101089 3 года назад +1

    Hi Kamal, Nice video. I wanted to ask what if we have several occurrences of search pattern and we want to store all using regrex ?

  • @bcmanyam2270
    @bcmanyam2270 3 года назад +1

    Hi Kamal, thank you very much for the detailed information video. I have one pdf file which contains multiple lines and address and quantity etc. I want to search billing address and extract next address lines XYZ company. It will very helpful if you could help me.
    Like "Bill Address"
    XYZ company
    street, road aa.

    • @xtremeExcel
      @xtremeExcel  3 года назад

      Hello. Please send a same file to me.

  • @gengen-1338
    @gengen-1338 4 года назад +1

    exactly what i needed, thx

  • @rizvim1713
    @rizvim1713 3 года назад

    How to do this?
    User input:
    BrancA folder path
    BranchB folder path
    Output:
    Different Funcion Name of BranchB
    Full path of File Name in BranchB
    LineNo
    Ex: void Hello(), xxx/xx/yy/file.c,#7

  • @rvandakar
    @rvandakar 3 года назад

    Hi Kamal,
    Could you please help me with this: stackoverflow.com/questions/66311160/python-regex-to-parse-search-sql-text-files
    Am trying this with both RegEx and SQLParse libraries.
    (1) Read sql file as plain text file
    (2) Get the complete sql query for "DELETE" statement. This might be single line or spread across multiple lines.
    (3) on this block of text, use either SqlSpars or RegEx to check whether WHERE condition exists
    (4) If yes, ignore. If no, PRINT notification with line number
    This is one of the rules to check. But am find it hard to read the full query blocks from the sql file. Could you please help

  • @adinarayanapillutla1287
    @adinarayanapillutla1287 4 года назад

    Hi Kamal, Thanks for the video which is very informative.
    Can you help with sample program where if line x got match then need to return line x+1

  • @johannafinnstrom1430
    @johannafinnstrom1430 4 года назад

    Hi Kamal,
    Thank you so much for this very informative and helpful video.
    I have a related question. I'd like to extract words, however, the word I'd like to extract is on a separate line. This means I can not use print.(re.search('word1 (.*?) word2', fin).group(1)).
    How to solve a similar problem when the word I'd like to extract is on a separate line?
    Your answer would be a lifesaver!
    Best Johanna

  • @arunsandeep1411
    @arunsandeep1411 4 года назад

    Hi Kamal
    That's informative.
    I have some difficulty
    To read the text file and identify specific number and replace and save back in a different text file
    Text file contains the following
    S No Speed Acceleration Distance
    1 120 25 12
    2 150 50 20
    3 200 35 18
    i want to replace the 200 speed with 165 and save in a different text file
    I will be very thankful to you if you help me on the above.
    Thanks,
    Arun