Try your regex with online tools, what you need is simple "kausik-(\d+)"
http://www.gethifi.com/tools/regex
http://regexpal.com/
http://nregex.com/nregex/default.aspx
2012/1/10 Kausik Bakshi
> I am very new in javascript
>
> and I want a regular expression for
>
> kausik-543678
>
> here kau
I am very new in javascript
and I want a regular expression for
kausik-543678
here kausik- is fixed
and
the next integer field is dynamic
I am trying to form a regular expression for
kausik-123456 or kausik-45765677367567 or kausik-64747
please help
Thanks in Advance
Kausik
--
Posted via
Very easy :-)
(\d+)(\w+)(\d{4})(\d{2})(\d{2}
)(\d{2})(\d{2})(\d{2})
Tests...
http://www.gethifi.com/tools/regex
http://nregex.com/nregex/default.aspx
http://regexpal.com/
2011/7/21 Leonel *.*
> I have a string composed of three parts.
> 1) a number, could be 1, 2, 3, 4 or more digits.
> 2)
On Jul 21, 2011, at 3:15 PM, Leonel *.* wrote:
> I have a string composed of three parts.
> 1) a number, could be 1, 2, 3, 4 or more digits.
> 2) the word pending
> 3) and then a date in this format: year,month,day,hour,minute,second
>
> I would like to extract each in a variable.
>
> Examples:
I have a string composed of three parts.
1) a number, could be 1, 2, 3, 4 or more digits.
2) the word pending
3) and then a date in this format: year,month,day,hour,minute,second
I would like to extract each in a variable.
Examples:
7pending20110721170832
504pending20110720110107
--
Posted via
On 16 February 2011 03:41, Rob Biedenharn wrote:
>
> On Feb 15, 2011, at 10:12 PM, Keith Raymond wrote:
>
>> I can't figure out why this regexp isn't working in my rails method.
>> I've been testing it with the the firefox regular expression tester add
>> on and it works there but not in the rails
On Feb 15, 2011, at 10:12 PM, Keith Raymond wrote:
I can't figure out why this regexp isn't working in my rails method.
I've been testing it with the the firefox regular expression tester
add
on and it works there but not in the rails app.
My expression is: /\Q[img['\E/
I'm trying to match
I can't figure out why this regexp isn't working in my rails method.
I've been testing it with the the firefox regular expression tester add
on and it works there but not in the rails app.
My expression is: /\Q[img['\E/
I'm trying to match: [img['
I am getting an error saying "Early end to regex
Having said that the logic should be in the controller I thought I
would point out a couple of errors in your code anyway so you may
understand more what was happening.
On 15 October 2010 20:49, Colin Law wrote:
> On 15 October 2010 13:42, PalaniKannan K wrote:
>> Dear All,
>>
>> I need to apply
Dear Collin,
Thank you.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
On 15 October 2010 13:42, PalaniKannan K wrote:
> Dear All,
>
> I need to apply a regular expression in html.erb
>
> <% taxon_name.strains.each do |strain| %>
> <% taxon_name.strain_appendices.each_with_index do |strain_appendice, i| %>
> <% if ((strain_appendice.data_source =~ /LPSN/) && (strain.
Dear All,
I need to apply a regular expression in html.erb
<% taxon_name.strains.each do |strain| %>
<% taxon_name.strain_appendices.each_with_index do |strain_appendice, i| %>
*<% if ((strain_appendice.data_source =~ /LPSN/) && (strain.relevance =~
/^ty(.*)ain$/))%>*
<% if i == 0 %>
<%= strain_a
On 04 Jun 2010, at 14:28, Srinivas Golyalla wrote:
Can u help me in simple regular expression that will match the string
‘123_456_7890’ but not ‘123_456_789’.
The thing you're asking is not very specific, there's a lot to be
interpreted, but this might be what you are looking for: \d{3}_\d{
Can u help me in simple regular expression that will match the string
‘123_456_7890’ but not ‘123_456_789’.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubsc
nice one David!
On Tue, Apr 27, 2010 at 5:34 PM, David A. Black wrote:
> Hi --
>
> On Tue, 27 Apr 2010, Vladimir Rybas wrote:
>
> "Antigua and Barbuda (+1268)".scan(/\d+/).to_s
>> => 1268
>>
>> "Antigua and Barbuda (+1268)".scan(/\(\+\d+\)/).to_s
>> => (+1268)
>>
>
> There's a nice technique fo
Hi --
On Tue, 27 Apr 2010, Vladimir Rybas wrote:
"Antigua and Barbuda (+1268)".scan(/\d+/).to_s
=> 1268
"Antigua and Barbuda (+1268)".scan(/\(\+\d+\)/).to_s
=> (+1268)
There's a nice technique for quickly getting a substring from a
string using a subscript-style notation:
"Antigua and Barb
"Antigua and Barbuda (+1268)".scan(/\d+/).to_s
=> 1268
"Antigua and Barbuda (+1268)".scan(/\(\+\d+\)/).to_s
=> (+1268)
On Tue, Apr 27, 2010 at 4:47 PM, HUNT HUNT wrote:
> var text="Afganistan (+86)"
> var code=text.sub(/\w+/, '')
> result: code = (+86)
> --
>
> va
var text="Afganistan (+86)"
var code=text.sub(/\w+/, '')
result: code = (+86)
--
var text = "Antigua and Barbuda (+1268)"
var code=text.sub(/\w+/, '')
result : code = and Barbuda (+1268)"
--
what regular expression I can try to get
$ irb
>> "module$block.item"[/\$(.*?)\./, 1]
=> "block"
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 23 March 2010 14:03, Marcio Machado wrote:
> Hi,
>
> I´m
Hi,
I´m trying to write a regular expression to get the substring "block"
in:
"module$block.item"
I´ve reached the obvious /\$.*\./ witch returns "$block." substring.
How do I get directly the "block" substring?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because yo
inotwell cumpiuter &and lunguish engilish thanks
On Sat, Dec 19, 2009 at 10:31 AM, AlwaysCharging wrote:
> In my app, I allow users to submit urls. They (of course) need the
> ability to submit urls with a forward slash, "/", but whats the
> regular expression to allow them to do that?
>
> I cu
In my app, I allow users to submit urls. They (of course) need the
ability to submit urls with a forward slash, "/", but whats the
regular expression to allow them to do that?
I currently use:
validates_format_of :url, :with => /^[-\w\_.]+$/i
to only allow alphanumerics, dashes, underscores, an
Hello All,
I wanted regular expression for the following patterns like
Nauzer Bharucha, TNN 10 September 2009, 12:01am IST
IANS 3 September 2009, 02:57pm IST
regular expression should return
*date* in first group
*author* in second group
and *agency* in third group
for below pattern it should
Hello
I am very week with regular expressions. It may be too easy for someone.
I have following regular expression
loc_content_re = /(?:([A-Za-z\s:]*?):)?([\s\S]*)/
> content = "HYDERABAD/NEW DELHI: Andhra Pradesh chief minister was "
>
I wanted to extract "HYDERABAD/NEW DELHI" from above
hi friends..
in my application i have number of days field.
it Should not allow user to input special characters in the field.and it
Should not allow blank space in the Number of Days field.
what regular expression can i use...
Thanks a lot
--
Posted via http://www.ruby-forum.com/.
--~--~---
Hi -
I would like to use gsub() to strip decimals with trailing zeros from
a string. My string looks like this:
--
19.0 " / 482.600 mm
--
I would like to end up with this:
--
19 " / 482.6 mm
--
Anyone have a regular expression that can do this?
Thanks!
--~--~-~--~~~---
Hi!
I couldn't understand the behavior of this code:
match = 'Today is Feb 23rd, 2003'.match(/Feb 23(rd)?/)
a = match.to_a
puts a.size# 2
puts a.join(",") # Feb 23rd,rd
puts a[0] # Feb 23rd
puts a[1] # rd
In my understanding, /F
Hello friends i need a regular expression which will check if the string
contain the special character or not? and accordingly it should return true,
false value.
Thanks
abhi
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
Hi there, I'm trying to split a string using RegExp to extract a price
from it. The price may or may not have a dollar sign in front of it
and may or may not contain a decimal value. Below are some string
examples of what the regular expression would need to handle to split
out the price:
Examp
29 matches
Mail list logo