Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regex - Is this possible?
#1
Desired Functionality:
Using python regular expressions (perl-like), is it possible to create a query which only finds matches for which it has not already found?

Examples:

Input String:
1 1 1 2 2 2 3 3 3 4 4 4 40 40 40 45 45 45

Regex:
????

Expected Output:
['1', '2', '3', '4', '40', '45']

---------------------------------

Input String:
the the quick quick brown brown fox fox jumped jumped over over the the lazy lazy dog dog

Regex:
????

Expected Output:
['the', 'quick', 'brown', 'fox', 'jumped', 'over', 'lazy', 'dog']

---------------------------------

Input String:
dog lazy the over jumped fox brown quick the the quick brown fox jumped over the lazy dog

Regex:
????

Expected Output:
['dog', 'lazy', 'the', 'over', 'jumped', 'fox', 'brown', 'quick']
Reply


Messages In This Thread
Regex - Is this possible? - by Fiel - 2010-11-27, 11:15 PM
Regex - Is this possible? - by Dusk - 2010-11-27, 11:24 PM
Regex - Is this possible? - by Fiel - 2010-11-27, 11:24 PM
Regex - Is this possible? - by Dusk - 2010-11-27, 11:30 PM
Regex - Is this possible? - by Russt - 2010-11-27, 11:34 PM
Regex - Is this possible? - by Fiel - 2010-11-27, 11:34 PM
Regex - Is this possible? - by Russt - 2010-11-27, 11:39 PM
Regex - Is this possible? - by Fiel - 2010-11-27, 11:42 PM
Regex - Is this possible? - by Dusk - 2010-11-28, 12:46 AM
Regex - Is this possible? - by Russt - 2010-11-28, 01:09 AM
Regex - Is this possible? - by Nikkey - 2010-11-28, 05:39 PM
Regex - Is this possible? - by Fiel - 2010-11-28, 06:14 PM
Regex - Is this possible? - by Spaz - 2010-11-29, 02:58 PM
Regex - Is this possible? - by Fiel - 2010-11-29, 03:07 PM
Regex - Is this possible? - by GummyBear - 2010-12-07, 12:29 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)