Need RegEx to find a string NOT containing a .

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
InteXX
Posts: 3
Joined: Mon Dec 07, 2009 7:55 am

Need RegEx to find a string NOT containing a .

Post by InteXX »

I have an HTML document that contains ~300 instances of this string:

Code: Select all

</p>\n  </div>
I need to search and find--one at a time, so I can manually edit the markup as I go--each instance that is NOT preceded by a period.

Ex:

Code: Select all

{a-z,A-Z,0-9}</p>\n  </div>
Is found,

Code: Select all

.</p>\n  </div>
Is not.

Am I asking for too much or can this be done?

Thanks,
Jeff
InteXX
Posts: 3
Joined: Mon Dec 07, 2009 7:55 am

Post by InteXX »

It seems I answered my own question merely by asking it:

Code: Select all

[a-zA-Z0-9]</p>\n  </div>
Thanks, nice to meet ch'all! :D
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

More generally, [^.] matches any single character that is not a period (and is not a newline).
InteXX
Posts: 3
Joined: Mon Dec 07, 2009 7:55 am

Post by InteXX »

That's even better, thanks.
Post Reply