generales, Ruby / 19.12.2013
A few regular expression examples
Hey there,
Here you can find some examples using regular expression if you want to test your own regular expression you could use the following website to do it:
http://rubular.com/
Regular expresion if you want for example match a exact word and that word is inside a full sentence sometimes and sometimes the first word or sometimes is the last word in the sentence you could use the following expression to get the correct matches:
[ruby]
( |^)404( |$)
or
(^|\s)404(\s|$)
[/ruby]