home > 比較編 > C, C++, Objective-C, Java, C# > regular expressions >

ForNext

Only Do What Only You Can Do

052. regex match

VBScript

JScript

Perl

PHP

Python

Ruby

PowerShell

Scala

F#

C

C++

#include <boost/xpressive/xpressive.hpp>
using namespace boost::xpressive;
sregex re = sregex::compile(".*ll.*");
smatch matches;
string s("hello");
bool is_match = regex_match(s, matches, re);

C++Builder

VC++

C#

using System.Text.RegularExpressions;
Regex regex = new Regex("ll");
bool isMatch = regex.IsMatch("hello");



Java

boolean isMatch = "hello".matches(".*ll.*");





Objective-C

NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", @".*ll.*"];
BOOL is_match = [pred evaluateWithObject:@"hello"];




D

VB

VB.NET

Delphi

Ada

PL/SQL

T-SQL

関数型

inserted by FC2 system