• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

/usr/lib/swipl/library/ext/pcre/pcre.pl
All Application Manual Name SummaryHelp

  • pcre
    • pcre.pl -- Perl compatible regular expression matching for SWI-Prolog
      • re_match/2
      • re_match/3
      • re_matchsub/3
      • re_matchsub/4
      • re_foldl/6
      • re_split/3
      • re_split/4
      • re_replace/4
      • re_replace/5
      • re_compile/3
      • re_flush/0
      • re_config/1
 re_split(+Pattern, +String, -Splits:list) is det
 re_split(+Pattern, +String, -Splits:list, +Options) is det
Split String using the regular expression Pattern. Splits is a list of strings holding alternating matches of Pattern and skipped parts of the String, starting with a skipped part. The Splits lists ends with a string of the content of String after the last match. If Pattern does not appear in String, Splits is a list holding a copy of String. This implies the number of elements in Splits is always odd. For example:
?- re_split("a+", "abaac", Splits, []).
Splits = ["","a","b","aa","c"].
?- re_split(":\\s*"/n, "Age: 33", Splits, []).
Splits = ['Age', ': ', 33].
Arguments:
Pattern- is the pattern text, optionally follows by /Flags. Similar to re_matchsub/4, the final output type can be controlled by a flag a (atom), s (string, default) or n (number if possible, atom otherwise).
ClioPatria (version V3.1.1-51-ga0b30a5)