Answer Posted / Mukesh Chaurasia
Ruby supports regular expressions (regex) to match patterns in strings. You can define regular expressions using forward slashes: `/pattern/`. For example, to match all email addresses, you could use the following regex:
```ruby
email_regex = /A[w+-.]+@[a-zd-]+(.[a-zd-]+)*.w{2,4}Z/i
```
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers