Fun Stuff > CLIKC
A programming thread!
GarandMarine:
//www.youtube.com/watch?v=qYodWEKCuGg
hedgie:
Well, at least he wasn't flinging poo.
ankhtahr:
I'm sitting in front of my IDE, having to do one of the two final tasks which are counted as exams until Sunday. I can't really motivate myself to do it.
ankhtahr:
Found out that using java.util.regex apparently isn't forbidden and makes the first part of the task a lot easier. Yay!
Edit: To specify: Finding every link in a long string marked with brackets ([[link]]) is a lot easier with regexes: \\[\\[(.*?)\\]\\]
ankhtahr:
Anyone here who knows their (Java) regexes better than I do?
I need to extract every "word" from a very long string (the strings may only contain the symbols mentioned in the description here). A word delimiter is either a space or any of the following symbols:
--- Code: ---.,;:_-?!
--- End code ---
Words which are connected with a hyphen are considered one word. (e.g. this-is-all-one-word) A word may contain numbers and umlauts, but must consist of at least one letter. My current regex for that is this one:
--- Code: ---[A-ZÄÖÜ]+[^.,;:_?!\ ]*
--- End code ---
(I use CASE_INSENSITIVE of course)
I still need a way to cut off a hyphen at the end of a word. I tried it with a "-?" at the end, putting the rest in parenthesis, but that doesn't work of course, because the "not these special characters" is greedy.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version