Home | Download | Support

C-Free - A Professional Excellent C/C++ IDE

Regular Expression

You can use regular expression in "Find" Dialog, "Replace" Dialog and "Find in Files" Dialog.

Regular expressions allow more complex search and replace functions to be performed in a single operation. C-Free support Perl style regular expressions. The Perl regular expression syntax is based on that used by the programming language Perl.

Regular Expressions (C-Free support):
Symbol Function
. Matches any single character except a newline character. Does not match repeated newlines.
[xyz] A character set. Matches any characters between brackets.
[^xyz] A negative character set. Matches any characters NOT between brackets including newline characters.
[a-z] Specifies a range of characters.
[^a-z] Negates the character class, causing it to match a single character not listed in the character class. 
\ Indicates the next character has a special meaning. "n" on it¡¯s own matches the character "n". "\n" matches a linefeed or newline character. See examples below (\d, \f, \n etc).
^ Matches/anchors the beginning of line.
$ Matches/anchors the end of line.
x| y Causes the regex engine to match either the part on the left side, or the part on the right side. 
* Matches the preceding character zero or more times.
+ Matches the preceding character one or more times. Does not match repeated newlines.
? Matches any single character except newline.
{n} Repeats the previous item exactly n times.
{m,n} Repeats the previous item between m and n times.
{m,} Repeats the previous item at least m times.

 Regular Expressions (C-Free syntax):
Symbol Function
\P Matches whitespaces.
\I Matches C/C++ identifier.
\C Matches C/C++ character.
\S Matches C/C++ string.
\N Matches numbers.
\D Matches decimal number.
\H Matches hexadecimal number.
\O Matches octal number.
\F Matches float number.