Questions tagged [rubular]

A Ruby-based regular expression editor and tester.

A Powerful and most efficient Domain for testing Regular Expressions.

Website: http://rubular.com/

66 questions
-1
votes
3 answers

Ruby regex need to exclude pattern

I have the following strings ALEXANDRITE OVAL 5.1x7.9 GIA# 6167482443 FINE w:1.16 ALEXANDRITE OVAL 4x6 FINE w:1.16 I want to match the 5.1 and 7.9 and the 4 and 6 and not w:1.16 or w: 1.16 or the 6167482443. So far I managed to come up with…
Jursels
  • 173
  • 1
  • 3
  • 12
-1
votes
1 answer

Regexp, strings between string

So string looks like that: abc_#xoxo#_xyz I want to pull out everyting except _#*#_ and get them in two match results (abc and xyz). I made a regexp to get stuff from inside: (?<=_#)[^}]*(?=#_) I have struggled with it for quite a while and have…
user2426176
-2
votes
1 answer

(.*?)<\/listRel:entityId>

Good day. My work requires me to query and get response from it. I cannot seem to remove the letters or name on this Match group. I need to get just the numbers 917857 I use rubular to check if the match is correct. 917857 James Bond
-2
votes
1 answer

Regular expression to match special characters within double quotes

My input string is : "& is here "& is here also, & has again occured"" Using gsub method in Ruby language, is there a way to substitute character '&' which is occuring within double quotes with character '$', if gsub method doesnt solve this…
Manu
  • 40
  • 1
  • 7
-3
votes
1 answer

Look for any character that surrounds one of any character including itself

I am trying to write a regex code to find all examples of any character that surrounds one of any character including itself in the string below: b9fgh9f1;2w;111b2b35hw3w3ww55 So ‘b2b’ and ‘111’ would be valid, but ‘3ww5’ would not be. Could…
Nik
  • 3
  • 2
-5
votes
2 answers

Email Regex. Is this regex expression appropriate?

Possible Duplicate: How to use a regular expression to validate an email addresses? \A[\w.-]+\w@[a-z\d\-.]+\.[a-z]+\z What do you think of the above expression for email validation. Any errors, any loopholes? Thank in advance for the support.
Yaw Boakye
  • 10,352
  • 1
  • 17
  • 25
1 2 3 4
5