百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

CppVerbalExpressions

> 编程语言
开源

轻松掌握 C++ 正则表达式

390 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

轻松掌握 C++ 正则表达式

CppVerbalExpressions

C++ Regular Expressions made easy

VerbalExpressions is a C++11 Header library that helps to construct difficult regular expressions.

This C++ lib is based off of the (original) Javascript VerbalExpressions library by jehna.

Other Implementations

You can see an up to date list of all ports on VerbalExpressions.github.io.

  • Javascript
  • Ruby
  • C#
  • Python
  • Java
  • PHP

How to get started

In case you do not have C++11 compliant standard library you can still use boost.regex.

Examples

Here's a couple of simple examples to give an idea of how VerbalExpressions works:

Testing if we have a valid URL

cpp
// Create an example of how to test for correctly formed URLs
verex expr = verex()
            .search_one_line()
            .start_of_line()
            .then( "http" )
            .maybe( "s" )
            .then( "://" )
            .maybe( "www." )
            .anything_but( " " )
            .end_of_line();

// Use verex's test() function to find if it matches
std::cout > & args )
* .range( const std::std::string & a, const & std::string b )
* .tab()
* .word()

### Modifiers
* .with_any_case()
* .search_one_line()
* .search_global()

### Functions
* .replace( const std::string & source, const std::string & value )
* .test()

### Other
* .add( expression )
* .multiple( const std::string & value )
* .alt()

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言