正则表达式来第一个空格后得到的一切 [英] Regex to get everything after the first space

查看:148
本文介绍了正则表达式来第一个空格后得到的一切的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

会是什么样的语法来获得字符串中的所有单词的首空间之后。例如,鲍勃漂亮的房子。所以结果应该是好房子无报价。

What would the syntax to get all the words in a string after the first space. For example, bobs nice house. So the result should be " nice house" without the quote.

([^ \s] +)给我所有的3个字被分开;

([^\s]+) gives me all 3 words seperated by ;

[\s\S] * $> 不编译。

推荐答案

我真的找最短的代码。下面做的工作。谢谢你们

I was really looking shortest possible code. following did the job. thanks guys

\s(.*)

这篇关于正则表达式来第一个空格后得到的一切的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆