Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #7309

Re: Ruby Regexp why this expression does not match?

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.ruby
Subject Re: Ruby Regexp why this expression does not match?
Date 2016-12-03 11:27 +0100
Message-ID <eafl0iFc5rkU1@mid.individual.net> (permalink)
References <8318472d-4632-4a06-b4c7-348316425ffa@googlegroups.com> <eafd5kFabknU1@mid.individual.net> <db77c550-f562-4b2f-94ce-0aafc204f54d@googlegroups.com>

Show all headers | View raw


On 03.12.2016 09:28, vunangluc@gmail.com wrote:
> Because I dont know how, to escape / in the // form.

Use the backslash, Luke.

> Note. In dotnet that regex work for me.

Note, Ruby != .Net.

> What is shortest regex for my purpose?

%r{/\*.*?\*/}m
/\/\*.*?\*\//m

	robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Back to comp.lang.ruby | Previous | NextPrevious in thread | Find similar


Thread

Ruby Regexp why this expression does not match? vunangluc@gmail.com - 2016-12-02 20:51 -0800
  Re: Ruby Regexp why this expression does not match? Robert Klemme <shortcutter@googlemail.com> - 2016-12-03 09:13 +0100
    Re: Ruby Regexp why this expression does not match? vunangluc@gmail.com - 2016-12-03 00:28 -0800
      Re: Ruby Regexp why this expression does not match? Robert Klemme <shortcutter@googlemail.com> - 2016-12-03 11:27 +0100

csiph-web