Skip to content

Commit

Permalink
fix: changed regex to support genes with square brackets at the end
Browse files Browse the repository at this point in the history
e.g. CELE_F49C12.2 ( WBGene00009872 ) [CELE_F49C12.2]
  • Loading branch information
valearna committed Jan 7, 2020
1 parent feecec1 commit 7e62f42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/frontend/curator_dashboard/src/AFPValues.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function extractEntitiesFromTfpString(entitiesString, prefix) {
* @returns {string} a string containing the list of entities in AFP format, ready to be stored in the DB
*/
export function transformEntitiesIntoAfpString(entitiesList, prefix) {
const addInfoRegex = / \( ([^ ]+) \)$/;
const addInfoRegex = / \( ([^ ]+) \)( \[[^ ]+\])?$/;
let entity;
let addInfo = "";
let results = [];
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/feedback_form/src/AFPValues.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function extractEntitiesFromTfpString(entitiesString, prefix) {
* @returns {string} a string containing the list of entities in AFP format, ready to be stored in the DB
*/
export function transformEntitiesIntoAfpString(entitiesList, prefix) {
const addInfoRegex = / \( ([^ ]+) \)$/;
const addInfoRegex = / \( ([^ ]+) \)( \[[^ ]+\])?$/;
let entity;
let addInfo = "";
let results = [];
Expand Down

0 comments on commit 7e62f42

Please sign in to comment.