Commit Graph

61 Commits

Author SHA1 Message Date
Eli Barzilay
7ec9975736 Move regexp-replaces' from ffi/unsafe' to `racket/private/string'.
* The old function was removed completely, people will get it from
  `racket/base' anyway.

* I also removed its documentation.  I thought about leaving a note in,
  but if `define-ffi-definer' is the preferred style, then this should
  be done when there's a way to make `define-ffi-definer' use it.  (Eg,
  some new #:keyword that adds a way to change the defined name.)

* Note that the function is added to `racket/private/string' and not to
  `racket/string' because the latter deals only with strings, and the
  new function accepts byte strings too.  It might be better to start a
  new `racket/regexp' module for these functions.
2012-06-22 14:27:14 -04:00
Eli Barzilay
7b4772e120 Extend `regexp-replace*' to accept a start/end-position.
Note that this pushes the `ipre' argument to the end.
2012-06-22 12:00:48 -04:00
Eli Barzilay
dcf2754a57 Clarify `regexp-split' on an empty input.
The text that says that (regexp-split #rx"whatever" "") returns '("")
rather than '() is

  If `input' contains no matches [...] the result is a list containing
  input’s content [...] as a single element.

This is a little implicit, if you consider such an input as having
nothing left to match over so it's as if there is no input (with a port
this confusion is a little clearer).

Clarify with an example in the docs, and also add tests.
2012-05-24 10:40:20 -04:00
Eli Barzilay
1c9de39348 Rename #:gap-select' -> #:gap-select?' and some minor doc fixes. 2012-04-17 15:56:10 -04:00
Eli Barzilay
0eb5f09e23 Add #:match-select' and #:gap-select' keyword arguments to
`regexp-match*', and the two `-positions' variants.
2012-03-13 10:29:14 -04:00
David Van Horn
f029117266 Fixes spelling errors in reference. 2012-02-21 14:21:43 -05:00
Matthew Flatt
ee775c3cc3 intern strings, etc. only when making syntax objects, not in `read'
Rename `read-intern-literal' to `datum-intern-literal'.

Interning is needed only in `read-syntax' or `datum->syntax' to
set up the invariants that the bytecode compiler needs for cross-module
optimization. When `read'ing numbers from a data file, meanwhile,
interning slows things down a lot and doesn't seem worthwhile.
2011-12-14 16:03:44 -07:00
Matthew Flatt
e44bd3f79d intern literal strings, byte strings, regexps, characters, and numbers 2011-11-22 08:54:37 -07:00
Matthew Flatt
d4f7020cd2 add cross-reference between data and read/print descriptions
Closes PR 11096
2011-10-15 07:20:33 -07:00
Matthew Flatt
82116cc3bd add examples to regexp docs 2011-09-03 15:01:11 -06:00
Matthew Flatt
4025206bd7 fix `regexp-match' docs 2011-09-03 13:11:33 -06:00
Eli Barzilay
debd1f9f1e Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)
2011-06-20 04:27:14 -04:00
Eli Barzilay
bad4a40741 Fix `regexp-quote' description.
Closes PR11818.
2011-03-31 06:16:53 -04:00
Matthew Flatt
0b496d5275 a round of doc corrections from Gwyth 2011-03-10 06:34:33 -06:00
Jon Rafkind
7ff1cdde81 use the currently documented function. closes pr11668 2011-01-25 21:25:36 -07:00
Matthew Flatt
9e9a3ef814 fix `regexp-match-exact?' to work on paths, drop ports from docs
Closes PR 11213
2011-01-08 10:29:32 -07:00
Matthew Flatt
8f23d9dc1a fix reference hyphen and some abbreviations 2011-01-07 09:48:03 -07:00
Matthew Flatt
3bb120545f fix ~300 typos reported by Vladimir Nesterovich (a.k.a. Gwyth)
--- but Gwyth's amazingly helpful review of chapters 1-11
     pointed out a few problems that are more difficult to fix
     and are still pending
2011-01-04 09:53:31 -07:00
Eli Barzilay
3bd84c617a Describe Unicode categories, move them to a separate table.
Also, use litchar on mentions of \-escapes and unicode categories on the LHS.

Closes PR 9424.
2010-11-01 08:25:35 -04:00
Matthew Flatt
dc99e1992c restore support for sub-matches in `regexp-replace*' 2010-06-26 18:23:54 -06:00
Matthew Flatt
900784c8e4 fix regexp sub-pattern reporting 2010-05-15 08:36:11 -06:00
Matthew Flatt
acb98cef60 allow paths as input to regexp-matching functions 2010-05-11 06:03:39 -06:00
Matthew Flatt
7cb13860ee reference racket conversions and scribble qq repairs 2010-04-23 17:00:53 -06:00
Matthew Flatt
4bc155905a Perl-like handling of empty matches in regexp-match*, etc., though without Perl-like filtering of empty strings in the result of regexp-split (PR 10855) 2010-04-14 22:53:14 -04:00
Matthew Flatt
1c34ccec44 improve regexp support (PR 10855, halfway) 2010-04-14 18:40:08 -04:00
Robby Findler
8228482d86 fixed up the regexp-match contracts to make them more specific
svn: r18030
2010-02-09 16:03:03 +00:00
Matthew Flatt
324743b1c0 refine regexp-split contract
svn: r15625
2009-07-29 19:18:57 +00:00
Eli Barzilay
3ec17454cf indentation
svn: r15138
2009-06-11 02:20:03 +00:00
Carl Eastlund
44505e77e3 Propagated contract documentation change for regexp-match from bug 10301 to related functions.
svn: r15136
2009-06-10 23:05:45 +00:00
Eli Barzilay
33da679c31 better output contract for regexp-match
svn: r15135
2009-06-10 22:33:06 +00:00
Eli Barzilay
c0a8a01222 Changed @itemize{...} to @itemize[...] (done after comparing the doc
tree and verifying that there are no changes).
(Also fixed a few bugs that were in the code)

svn: r14427
2009-04-05 17:46:20 +00:00
Matthew Flatt
b6f3bab025 add pin-curve, pin-arrow-curve, pin-arrows-curve
svn: r13818
2009-02-24 17:25:39 +00:00
Matthew Flatt
87274b2a97 procedure-rename
svn: r12952
2008-12-30 14:36:25 +00:00
Eli Barzilay
e2c5c973fc document improved splitting with empty matches
svn: r12581
2008-11-24 23:42:20 +00:00
Matthew Flatt
46af55311d regexp contract refinemenets (follow-up on PR 9840)
svn: r12065
2008-10-19 11:20:13 +00:00
Eli Barzilay
5e323e53b7 conract fixes (PR9840)
svn: r12053
2008-10-17 14:57:12 +00:00
Matthew Flatt
d3397103a8 add some datatype deftechs
svn: r12026
2008-10-13 21:36:18 +00:00
Matthew Flatt
077e5a4666 change reference and some other docs to use #f instead of false/c and or/c insteda of one-of/c
svn: r12023
2008-10-13 19:45:37 +00:00
Eli Barzilay
d26f27e140 Lots of minor edits -- mainly dropping unnecessary backslashes and
using @litchar with braces.

svn: r11451
2008-08-27 08:35:27 +00:00
Matthew Flatt
2c813c53c5 fix '(nonnegative|positive)-exact-integer?' contracts (moving 'exact-' to the front where it belongs)
svn: r10960
2008-07-29 12:56:05 +00:00
Matthew Flatt
763d37d775 properties can now effectively inherit properties (v4.0.2.5)
svn: r10848
2008-07-21 17:04:25 +00:00
Eli Barzilay
bba44e46e8 clarify arity of procedure input to regexp-match
svn: r10838
2008-07-19 02:25:40 +00:00
Matthew Flatt
6f6d8d74b4 regexp doc repairs and links
svn: r9876
2008-05-17 12:29:58 +00:00
Matthew Flatt
548e45408b regexp-replace* handles empty matches; empty-match handling documented
svn: r9751
2008-05-08 20:29:56 +00:00
Matthew Flatt
82c212625b sgl docs
svn: r9362
2008-04-18 18:49:23 +00:00
Eli Barzilay
264af9a6d0 improved scribble syntax use
svn: r8720
2008-02-19 12:22:45 +00:00
Eli Barzilay
ef5e871f49 add back the erroneous byte-regexp expression
svn: r8537
2008-02-05 14:34:20 +00:00
Eli Barzilay
426a4ce5c4 more regexp fixes
svn: r8536
2008-02-05 10:05:00 +00:00
Eli Barzilay
b02db9ee94 fix default value for regexp-quote
svn: r8535
2008-02-05 09:59:25 +00:00
Matthew Flatt
1d8b21f53b disallow empty application; rename regexp-match/fail-without-reading to regexp-try-match
svn: r8152
2007-12-29 13:51:32 +00:00