RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Find two words, any characters, then number
Expression
(Word1|Word2).*?(10|[1-9])
Description
If you have one or more words that you are searching for, random text and then a number at the end from 0 to 10, this regex should work.
Matches
Word1: I need to extract this substring starting with testing. 8
Non-Matches
This is a test, again I am test
Author Rating: Not yet rated. Dan Brewerton
Source http://forums.asp.net/t/1706541.aspx/1?extracting+a+substring+from+a+huge+string
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials