开发者

Regex, how to select all items outside of selection group

开发者 https://www.devze.com 2023-01-27 06:35 出处:网络
I\'m a Regex noob and am pretty sure I\'m not going about this in the most efficient way - wanted to get some advice.

I'm a Regex noob and am pretty sure I'm not going about this in the most efficient way - wanted to get some advice.

I have a Regex expression 开发者_开发知识库((\w+\b.*?){100}){1} which selects the first 100 words of my string, the length of which varies.

What I want is to select the entire string except for the first 100 words. Is there syntax I can add to my current expression to do this, or am I better off trying to directly select the rest of the text instead.

Also, if anyone has any good resources for improving my Regex knowledge, i'd be very appreciative. Thus far I've found http://gskinner.com/RegExr/ to be very helpful.

Thanks in advance!


If you use this, you can refer to everything else as group 3 noted as $3 This one will treat hyphenated words as one word.

(\w+(-\w+|\b).*?){100}(.*)

Regex training Here

0

精彩评论

暂无评论...
验证码 换一张
取 消