简体   繁体   English

如何使用 c 读取此格式化文本文件?

[英]How can i read this formatted text file with c?

enter image description here在此处输入图像描述

i have text file of movies and actors.But last actor names are connected to next movies name as you see and i have no idea how to read this file,can you help me about it?我有电影和演员的文本文件。但是如你所见,最后一个演员的名字与下一部电影的名字相关,我不知道如何阅读这个文件,你能帮我看看吗?

Note:edit isnt allowed注意:不允许编辑

As I've noticed, the name of the actor is attached to the name of the movie in such away that there is no space before the movie.正如我所注意到的,演员的名字附在电影的名字上,以至于电影之前没有空格。 So you can search for combination of a non-space and non-slash character followed by the upper-case letter.因此,您可以搜索非空格和非斜线字符后跟大写字母的组合。 For example search for upper-case letters and when you find one, check if the previous character is a lower-case letter.例如搜索大写字母,找到后检查前一个字符是否为小写字母。 If that is the case, the movie starts at this point.如果是这样,电影就从这里开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM