Click here to Skip to main content
15,921,452 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have a file that contain full of numbers but in some lines it has sentences. Can anyone tell me how to identify the sentences and ignore the sentences and sentences changes always not able to fix for one starting word

What I have tried:

i tried giving long range in ignore
Posted
Comments
Patrice T 9-Dec-17 4:29am    
Got some code and sample data?

1 solution

There are a few more questions to ask like is the entire line one a sentence or can it be embedded within the numbers?

If the sentences take up the entire line then you can detect if a line starts with a numeric value or an alphabetic character and handle them accordingly. Hint : starting with an alphabetic character would be a sentence.
 
Share this answer
 
Comments
Member 13475664 9-Dec-17 3:02am    
entire line is one sentence no numbers
Member 13475664 11-Dec-17 7:36am    
is it possible to compare the line format, if the current line and previous line are different then ignore it. So if i compare the line with numbers with the one with sentences then ignore that sentence line
Rick York 11-Dec-17 10:29am    
Yes, that is possible but I don't see a purpose to doing that. Checking the type of character is very easy. There are the isdigit and isalpha functions and several others that help with that.
Member 13475664 11-Dec-17 14:25pm    
Thanks for the hint I would see through it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900