Understanding the "any" character

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
pieter1
Posts: 4
Joined: Sat Jan 30, 2010 6:51 pm

Understanding the "any" character

Post by pieter1 »

I have a series of files which contain structures like:
<Z>...<a>...</a><b>...</b>...><c>...</c>...><d>...</d>...etc.</Z>
... stands for multiline content including other xml tags.

I need to replace in all files the the a and b content. I defined my search string as:
<a>[\.\n]{*}</b>
The \. is defined in the manual (version 7.6.3) as any character except newline, hence the collection of these two in the search.
Apparantly this was a naive assumption. What do I miss?
pieter1
Posts: 4
Joined: Sat Jan 30, 2010 6:51 pm

Re: Understanding the "any" character

Post by pieter1 »

Do I understand correctly from the post: RE: Replace specific links with the underlying link text that the . (dot) and not the \. should be used as the any character?
My example still does not work if I remove the \ from the filter

Pieter Zanstra
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Understanding the "any" character

Post by DataMystic Support »

Hi Pieter,

Within a character class [], both . (normally a wildcard for any character) and \. , which stands for a period (full stop), both take the meaning of a full stop.

So [.] and [\.] both mean the same as '.'.

Outside of a character class, the meaning of '.' is controlled by the Matching Options dialog - the [...] button next to the Search Type.
Post Reply