Login
|
Signup
langref.org
-
perl
add..
all
clojure
cpp
csharp
erlang
fantom
fsharp
go
groovy
haskell
java
ocaml
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
Matching
Check if a string matches with groups
Display
"two"
if
"one two three"
matches
/one (.*) three/
perl
print $1 if "one two three"=~/^one (.*) three$/
print $1 if "one two three"=~/^one (.*) three$/
Submit a new solution for
perl
There are 18 other solutions in
additional
languages (
clojure
,
cpp
,
csharp
,
erlang
...)