What's the most appropriate type of index to use for this function-based query? I'm using Postgres 9.5.  I'm going to be running a lot of this kind of query

SELECT * 
FROM mydb_article 
where regexp_replace(url, '\?.*$', '') = :url_wo_query_string


so I figured I would need to create a functional index on my table for that operation.  So I tried

mydb=&gt; CREATE INDEX my_article_idx ON mydb_article regexp_replace(url, '\?.*$', '');
ERROR:  syntax error at or near "regexp_replace"
LINE 1: CREATE INDEX my_article_idx ON mydb_article regexp_repl...


My question is, what's the most appropriate type of index I should be using and if its the above, what else do I need to do to get things to work right?
The list of expressions for an index must be put between parentheses on table_name (a,b,c). If the index expression is not just a column name, the expression itself must be enclosed with parentheses as well:

CREATE INDEX my_article_idx 
   ON mydb_article ( (regexp_replace(url, '\?.*$', '')) );