Comments (2)
|std.string.regex_find(text, pattern)
* Searches `text` for the first occurrence of the regular
expression `pattern`.
* Returns an `array` of two `integer`s, the first of which
specifies the subscript of the matching sequence and the second
of which specifies its length. If `pattern` is not found, this
function returns `null`.
* Throws an exception if `pattern` is not a valid regular
expression.
std.string.regex_find(text, from, pattern)
* Searches `text` for the first occurrence of the regular
expression `pattern`. The search operation is performed on the
same subrange that would be returned by `slice(text, from)`.
* Returns an `array` of two `integer`s, the first of which
specifies the subscript of the matching sequence and the second
of which specifies its length. If `pattern` is not found, this
function returns `null`.
* Throws an exception if `pattern` is not a valid regular
expression.
std.string.regex_find(text, from, [length], pattern)
* Searches `text` for the first occurrence of the regular
expression `pattern`. The search operation is performed on the
same subrange that would be returned by
`slice(text, from, length)`.
* Returns an `array` of two `integer`s, the first of which
specifies the subscript of the matching sequence and the second
of which specifies its length. If `pattern` is not found, this
function returns `null`.
* Throws an exception if `pattern` is not a valid regular
expression.
std.string.regex_match(text, pattern)
* Checks whether the regular expression `patterm` matches the
entire sequence `text`.
* Returns an `array` of `array`s of optional `string`s. The first
element contains a copy of `text`. All the other elements hold
substrings that match positional capturing groups. If a group
matches nothing, the corresponding element is `null`. The total
number of elements equals the number of capturing groups plus
one. If `text` does not match `pattern`, `null` is returned.
* Throws an exception if `pattern` is not a valid regular
expression.
std.string.regex_match(text, from, pattern)
* Checks whether the regular expression `patterm` matches the
subrange that would be returned by `slice(text, from)`.
* Returns an `array` of `array`s of optional `string`s. The first
element contains a copy of `text`. All the other elements hold
substrings that match positional capturing groups. If a group
matches nothing, the corresponding element is `null`. The total
number of elements equals the number of capturing groups plus
one. If `text` does not match `pattern`, `null` is returned.
* Throws an exception if `pattern` is not a valid regular
expression.
std.string.regex_match(text, from, [length], pattern)
* Checks whether the regular expression `patterm` matches the
subrange that would be returned by `slice(text, from, length)`.
* Returns an `array` of `array`s of optional `string`s. The first
element contains a copy of `text`. All the other elements hold
substrings that match positional capturing groups. If a group
matches nothing, the corresponding element is `null`. The total
number of elements equals the number of capturing groups plus
one. If `text` does not match `pattern`, `null` is returned.
* Throws an exception if `pattern` is not a valid regular
expression.
std.string.regex_replace(text, pattern, replacement)
* Searches `text` and replaces all matches of the regular
expression `pattern` with another regular expression
`replacement`. This function returns a new `string` without
modifying `text`.
* Returns the string with `pattern` replaced. If `text` does not
contain `pattern`, it is returned intact.
* Throws an exception if either `pattern` or `replacement` is not
a valid regular expression.
std.string.regex_replace(text, from, pattern, replacement)
* Searches `text` and replaces all matches of the regular
expression `pattern` with another regular expression
`replacement`. The search operation is performed on the same
subrange that would be returned by `slice(text, from)`. This
function returns a new `string` without modifying `text`.
* Returns the string with `pattern` replaced. If `text` does not
contain `pattern`, it is returned intact.
* Throws an exception if either `pattern` or `replacement` is not
a valid regular expression.
std.string.regex_replace(text, from, [length], pattern, replacement)
* Searches `text` and replaces all matches of the regular
expression `pattern` with another regular expression
`replacement`. The search operation is performed on the same
subrange that would be returned by `slice(text, from, length)`.
This function returns a new `string` without modifying `text`.
* Returns the string with `pattern` replaced. If `text` does not
contain `pattern`, it is returned intact.
* Throws an exception if either `pattern` or `replacement` is not
a valid regular expression.
from asteria.
Note the functions in e106afd are a bit different from these.
from asteria.
Related Issues (20)
- Output something more helpful in case of unmatched brackets
- Disable implicit global names
- Standard library functions should have parameters if they are stringified
- Add zlib and MD5/SHA-1/SHA-2 from OpenSSL
- C stack overflows
- `catch` operator? HOT 2
- Add INI library
- Add CSV library HOT 1
- Autoconf error! HOT 1
- `errno` and `rocket::format()`
- Remove `Value::type_mask()` HOT 1
- Generalize for-each loops
- Optimize flat function calls
- Constant Propagation
- Optimization records HOT 3
- mutex in 'rocket/xmemory' is slow HOT 1
- Grant ?? highest precedence
- status of `continue` with in a for-each loop is not forwarded correctly
- `Abstract_Hooks` needs some cleanup
- `each` clause in `switch` statements HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asteria.