Skip to content

How can I extract some part of the title from notes title ? #346

Discussion options

You must be logged in to vote

Heres the code

<%*
let re = new RegExp('Lab-(\\d+)_.*');
var myString = tp.file.title;
var match = re.exec(myString); 
var an="0"
if(match!=null)
an=match[1]
tR=an
%>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by radha1990kumari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant