haskell - Complex pattern matching with strings -


I have a list of strings that look like this:

  xs = [ I would like to find only the string in the list, in which two b and any of the characters in a hose after a vowel, "xabbaua" bbaaqvi "," jigfahaha "," utatakaaka "," iabatb "]   

Is there a better solution to regular expressions like simple matches done? Can someone help me with an example? Thanks.

They can also use the classic filter function in combination with the regexp library. Your pattern is very simple that it will work with any regexp library:

  filter (= ~ " Bibi. [AYUY] ") xs   

The part of regexps in deceptive Haskell is to use a very powerful general API in the same manner as all those typical libraries And many result types for (boole, string, inter ... ). For the basic uses, you should work most (TM) for your specific need, regex-posix should be enough (and come with the Haschle platform, so it is not necessary to set it normally). So do not forget to import it:

  import text. Rezox If you have other, you should show the basics of the Reggae API; Given the needs, this is a little late date but the basic principle is the same, only regex-base Details have changed.   

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -