|
|
Browse by Tags
All Tags » regex (RSS)
-
Hi, I'm not very good with regular expressions, so if anyone can help me...
I have simply to extract the first word from a text, so it must stop on the first whitespace I think.
Example:
apple (house) -> apple
computer tree city -> computer
Suggestions?
Thanks in advance!
-
Thank-you, your answer helps a lot.
My problem is the following: if a string has a left bracket, then keep everything before the bracket, else keep the whole string.
Example:
text1 text2 (text_to_discard) ...
|
|