Jump to content

Find word before parenthesis


Hybride

Recommended Posts

Hi everyone,

 

Am trying to create a regular expression that finds the word before the parenthesis in user's query. This is what I mean:

 

type(object).

needthis(user'sQuery).

 

Or in a highly complex situation,

needthis(word1, word2) :- needalso(x, y), needalso(y,z).

 

Any ideas on how to do this? Help greatly appreciated. (For those of you curious, am trying to find the predicates in a prolog statement.)

Link to comment
https://forums.phpfreaks.com/topic/221720-find-word-before-parenthesis/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.