I loathe regular expressions.
-
Hi All! :-D I have posted a fe questions, read many tutorials, and doco's, have been on MSDN and Google, and have found absolutely zero support for the task I am trying to accomplish. I am simply trying to find every URL that is found in a plain text file, but it seems almost impossible to do since every sample I have tried, including my own code, does not work. It either brings up too many errors, or just never finds anything. Or both sometimes. Does anybody know of any reliable sources that could simply explain how one would go about finding all URL's inside a text file and saving those URL's to a new file each on a separate line, wether it is using Regex or something else? Any help would be appreciated. Thanks :) Regards, jay.
jay
-
Hi All! :-D I have posted a fe questions, read many tutorials, and doco's, have been on MSDN and Google, and have found absolutely zero support for the task I am trying to accomplish. I am simply trying to find every URL that is found in a plain text file, but it seems almost impossible to do since every sample I have tried, including my own code, does not work. It either brings up too many errors, or just never finds anything. Or both sometimes. Does anybody know of any reliable sources that could simply explain how one would go about finding all URL's inside a text file and saving those URL's to a new file each on a separate line, wether it is using Regex or something else? Any help would be appreciated. Thanks :) Regards, jay.
jay
Hi As far as I know you can use regular expressions to find different patterns in a text. I think you should find one or more suitable regex patterns for the task you want to accomplish. May be you should take a look at some regex libraries[^]
-
Hi As far as I know you can use regular expressions to find different patterns in a text. I think you should find one or more suitable regex patterns for the task you want to accomplish. May be you should take a look at some regex libraries[^]
-
Hi All! :-D I have posted a fe questions, read many tutorials, and doco's, have been on MSDN and Google, and have found absolutely zero support for the task I am trying to accomplish. I am simply trying to find every URL that is found in a plain text file, but it seems almost impossible to do since every sample I have tried, including my own code, does not work. It either brings up too many errors, or just never finds anything. Or both sometimes. Does anybody know of any reliable sources that could simply explain how one would go about finding all URL's inside a text file and saving those URL's to a new file each on a separate line, wether it is using Regex or something else? Any help would be appreciated. Thanks :) Regards, jay.
jay
Regular expressions are hard to write and very powerful once you get it to work. Start with some simple pattern so that you get a result, like finding every occurance of the string "http://" in the text. Then you can refine the pattern to find exactly what you want.
Despite everything, the person most likely to be fooling you next is yourself.
-
Hi All! :-D I have posted a fe questions, read many tutorials, and doco's, have been on MSDN and Google, and have found absolutely zero support for the task I am trying to accomplish. I am simply trying to find every URL that is found in a plain text file, but it seems almost impossible to do since every sample I have tried, including my own code, does not work. It either brings up too many errors, or just never finds anything. Or both sometimes. Does anybody know of any reliable sources that could simply explain how one would go about finding all URL's inside a text file and saving those URL's to a new file each on a separate line, wether it is using Regex or something else? Any help would be appreciated. Thanks :) Regards, jay.
jay
-
Yep. I second that. Wonderful tool :)
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
Thanks everyone for your answers :-) i checked out the regex libs and quickly ran away from there lol... but then i checked out expresso, looks really cool it's still downloading, i can't wait to use it! thanks everyone :-D Here's an idea... If our brains consisted of computer chips, wouldn't it be cool if all we had to do to learn something new was to insert a tiny memory chip into our ears which stores all the learning material on it? Then if we needed to recall information, we can just use our minds to search thru directories and subdirectories to find the file in our mind that has our info? lol
j.t.