You are here: PSPad forum > English discussion forum > RegEx for pascal

RegEx for pascal

#1 RegEx for pascal

Posted by: toralf | Date: 2015-04-29 04:20 | IP: IP Logged

I would like to suggest some improvements to your parser, but would need some help to make some modifications in the pascal file first as a proof of concept.

I have programmed a parser for AHK in AHK and started now to translate it to Pascal for ParseAHK().

To do this, I would like to ask for some assistance from you, since I do not know the pascal language. In the parser for the code explorer you used a function ParseAndAddNode() that uses as one of their parameters a regex string.
1) What is the command(s) in Pascal that is/are used for regex. In AHK RegExMatch and RegExReplace exist.

In addition I would also need to know if pascal has
2) a command that removes a number of characters from that left or right side of a string
3) a ternary operator?
4) a command that finds a string in another string

If 3) and 4) do not exist, then I could use if or regex to do it, respectively. But for 1) and 2) I would need definitively some help. Looking at Pascal tutorials on the internet I haven't found any good resource (yet).

--
Ciao
toralf

Options: Reply | Quote | Up ^


#2 Re: RegEx for pascal

Posted by: pspad | Date: 2015-05-19 12:36 | IP: IP Logged

Parser is made as simple as possible to turn into user defined parser into future.
If I will allow some individual hard coded string manipulation, this step wont be possible.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR