electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

how to extract out the line number and filename from string


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> how to extract out the line number and filename from string
Author Message
txdx2005



Joined: 15 Jul 2006
Posts: 42


Post05 Dec 2006 4:10   

Re: how to extract out the line number and filename from str


how to extract out the line number and filename from string by regular expression
the string is :

*** ERROR C141 IN LINE 436 OF G:\KEIL\SMS\TEST.C: syntax error near 'while'

The following special characters are interpreted in regular expressions

Table 4.3: Regular Expression Characters
Character
Matches

^ (at the beginning only)
beginning of line

.
any single character

[abc]
any single character that belongs to the set abc

[^abc]
any single character that does not belong to the set abc

*
zero or more occurrences of the preceding character

+
one or more occurrences of the preceding character

\t
a tab character

\s
a space character

\w
white space (a tab or a space character)

$
the end of the line


Sets, such as [abc] may be in the following formats.

Table 4.4: Regular Expression Sets
Set type
Meaning

[<character list>]
eg. [abcde]
Matches any character within the set. The set can be any number of characters long.

[x-y]
eg. [a-z]
Matches on any character within the range of x through y, inclusively. The ASCII value of x must be less than that of y.

combination;
eg. [WXYa-z0-9]
Character lists and ranges may be combined.




--------------------------------------------------------------------------------

Added after 4 minutes:

this use in sourceinsight "Parse Source Links "
i dont know how t write this expression.
default pattern is " ^\([a-zA-Z].*\)(\([0-9][0-9]*\)).* "
Back to top
Google
AdSense
Google Adsense




Post05 Dec 2006 4:10   

Ads




Back to top
txdx2005



Joined: 15 Jul 2006
Posts: 42


Post06 Dec 2006 1:45   

how to extract out the line number and filename from string


no reply.
help me.thx
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> how to extract out the line number and filename from string
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
How can I extract the value on inductor and Q from momentum (1)
HOW CLI displays number from analog phone line (1)
[Matlab]Load each line of string separately (from a file) ? (3)
How to convert a number string to several integer? (1)
how to filter out the glitch from the interface? (6)
How to get the dial number from GSM module (2)
Driving transistor as swich from line out. (3)
[Matlab] How to load string from file? (3)
the number of wavelength in transmission line (3)
Program to extract schematic from the netlist (5)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS