Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

Checking for "any character" using regular expressions in multiline text

, 8 Feb 2012
\S does not / did not work on all versions of RegExp on Microsoft JScript / VBScript (sorry to be vague - I just recall having to avoid it because it was flakey). Instead you could try Start([.|\n]*)End (match everything except newline and newline)Update: Checked some old code: I could...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

30 Jan 2012
Chris Maunder
2 alternatives  
".*" may not be what you want in multi-line strings
30 Jan 2012
Matt T Heffron
For .NET and Perl Regex: Instead of changing the Regex pattern, use the RegexOptions.Singleline (.NET) or "s" modifier (Perl). This enables "." to match newline.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

jsc42

United Kingdom United Kingdom
No Biography provided

| | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 8 Feb 2012
Article Copyright 2012 by jsc42
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid