Jump to content

regexp why not match \r ?

Recommended Posts

hi guys i have  a  xml with this  code


i want  match  30.00  i try to do wit this regexp

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
#include <File.au3>

    Local $aLDen = StringRegExp($string, '<Tipo>SC<\/Tipo>\n\r<Importo>(.*?)<\/Importo>', 3)

but not work whats wrong  ??

Share this post

Link to post
Share on other sites

yea regexp buddy  explain me  s+ match white space unlimited times .... forever :D you match a white space , because i think probably carriedge return not exist :D

Share this post

Link to post
Share on other sites

Well  \r\n  or even \R  would have been better to match the newline...  but there are also some possible horizontal white spaces just before the <Tipo>  ;)

Share this post

Link to post
Share on other sites

Yes, but also because the newline sequence is /r/n, not /n/r :)

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.


My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts

Share this post

Link to post
Share on other sites
2 hours ago, faustf said:

ups  some time i am dislessic  sorry :)

To make it clear right from the beginning :
This advice is meant to be a serious help. I do not intend to insult or disparage @faustf in any way.

@faustf :

From what I can determine, your native language is Italian (which is a beautiful language :)). My problem (and maybe that of others as well) is, that sometimes I cannot even figure out what you are trying to say (in English).
Perhaps it may help you, if you take a look at the following website (it's free) :


As far as I can judge, the quality of the translations is better than Google. You can e.g. click on individual words in the translation and a selection of alternative words will appear.

I use this site occasionally myself as a final control for long texts. My English also is far from being perfect ;).


"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Share this post

Link to post
Share on other sites

Amico Fritz @Musashi thankz , you win a beer , when you will come in italy (near vinci , do you know leonardo? .....probably yes), Thanks, I get up in the morning to improve myself, I go to sleep hoping to have done so.

Share this post

Link to post
Share on other sites

\R is preferable: it matches \r or \n or \r\n according to AutoIt default PCRE options.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...