Please note: We have moved the forum to our new self-service portal. You are welcome to start a discussion in the new MAXQDA forum!

Adding and editing posts is no longer possible in this forum.

Question about regular expressions

13.03.2024, 10:14

Dear all,

I have a question about regular expressions. First of all, I hope I am not cross-posting, but after searching I could not directly find a similar topic.

First some background. I am a PhD student (marine social sciences) and I am using MAXQDA Plus 2020 for coding interview transcripts, systematic literature review and policy analysis. So far, my experiences with MAXQDA have been very positive (an intuitive interface and many analysis functions).

Now, for the policy analysis what I am actually interested in are finding descriptions of interactions between stakeholders. More specifically, exchanges of knowledge in the process of decision-making. So far, I have found some expressions that are very often associated with some kind of interactions between two or more stakeholders. And I wondered: would it be possible to use regular expressions to easily identify those and autocode them?

As I have zero experience with regular expressions, I had a try with ChatGPT, specifying they should be Perl-compatible (PCRE). However, after generating a couple of regular expressions, when trying them out in MAXQDA, using lexical search, it would not return any results in the documents.

What could be the cause for this? Perhaps useful, here is an example of one of the regular expressions I have tried out:


My hope was that it may allow to, for example, more easily identify instances where a stakeholder must prepare a document for an authority (e.g. to obtain a permit). My understanding is that the regular expression also looks for cases where word(s) would stand between "prepare" and "for" and following "for".

Is it the syntax that may not be correct after all? Or are there certain limitations to using regular expressions that I did not find out yet?

Thanks a lot for your advice

PS: I think MaxDictio with its "dictionary" function and "keyword in context" search can offer an interesting alternative for my needs.

Version: MAXQDA 2020
System: Windows 10
Posts: 2
Joined: 06.03.2024, 16:13

Re: Question about regular expressions

02.04.2024, 10:42

Hello and thank you for your question,

I am not an expert on regular expressions either (and this one seems quite complex) but first of all, have you checked the box "interpret search terms as regular expressions" in the settings window of "lexical search"?

Also, you could try to only use a smaller element of the command such as "\bprepare" and see if that works. Lastly, you could ask ChatGPT why it is not working and how to simplify it.

I hope that helps!

Best wishes from the Support team,

Wolfgang Meyer
Posts: 28
Joined: 21.08.2023, 08:33

Re: Question about regular expressions

03.04.2024, 16:02

Dear Wolfgang,

Thank your for your reply. I agree, it may be that these regular expressions are very complex, hindering the search. Breaking it down into smaller elements may be more effective in that respect. In fact, I am now experimenting using ChatGPT and MAXQDA next to each other and seeing interesting possibilities there as well.

Best, Roald
Posts: 2
Joined: 06.03.2024, 16:13

Return to Technical Questions

Who is online

Users browsing this forum: No registered users and 3 guests

We use cookies to improve your experience on our website. By clicking OK or by continuing to browse the website, we’ll assume that you are happy with their use. Click here to review our Cookie Policy. OK