Login
|
Signup
langref.org
-
fantom
add..
all
clojure
cpp
csharp
erlang
fsharp
go
groovy
haskell
java
ocaml
perl
php
python
ruby
scala
Home
All
Solved
Unsolved
Strings
Numbers
Regex
Lists
Maps
Structure
Files
Dates
OOP
Networking
XML
Algorithms
Misc
Parallel
View Problem
Regex
Replacing
Replace all regex matches in a string with a static string
Transform
"She sells sea shells"
into
"She X X shells"
by replacing
/se\w+/
with
"X"
fantom
replaced := Regex<|se\w+|>.split("She sells sea shells").join("X")
class SolutionXX
{
Void main()
{
replaced := Regex<|se\w+|>.split("She sells sea shells").join("X")
echo(replaced)
}
}
Submit a new solution for
fantom
There are 15 other solutions in
additional
languages (
clojure
,
cpp
,
csharp
,
erlang
...)