Solved: Help with Regex

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

colinsp

Colin
Thread Starter
Joined
Sep 5, 2007
Messages
2,354
I am trying to create a Regular expression to find a whole sentence that starts with the word

Here's

and ends with a

.

What I have so far is

Code:
(?sx-m)[^\r\n].*?(?:(?:\.|\?|!)\s)
This finds a whole sentence but I have modified it every way that I can think of to get it to find the sentences that i want without success.

Has anyone got an ideas?

Whilst you are at it I also need to find a series of numbers in the format of

2,3##,###

Anyone know what the regex for this would be?

TIA
 

colinsp

Colin
Thread Starter
Joined
Sep 5, 2007
Messages
2,354
Sorted this another way without Regex so marked as solved.
 

colinsp

Colin
Thread Starter
Joined
Sep 5, 2007
Messages
2,354
I ended up using some of the Replace features in Notepad++ which marks lines as bookmarks (rather than using the regex search/replace options) and then you can delete the bookmarks. It worked perfectly for the text I was editing as this wasn't directly for a web page but was for cleaning some text before displaying it on a web page.
 

JiminSA

Jim
Joined
Dec 15, 2011
Messages
3,407
Thanks Colin - I also use Notepad++, but hadn't seen that feature - ta(y)
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top