Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export RE.Regex, and make constructors easier. #167

Closed
panxiaoguang opened this issue Jul 14, 2021 · 2 comments
Closed

Export RE.Regex, and make constructors easier. #167

panxiaoguang opened this issue Jul 14, 2021 · 2 comments
Milestone

Comments

@panxiaoguang
Copy link

panxiaoguang commented Jul 14, 2021

I want to have a regex search search for biosequences, and it can be changed by a value.

for example,

start="AGCAT"
re=@biore_str(string(start,"[AGCT]+"),"d")

it always repored an error, but I want it can be changed by start value?

@jakobnissen
Copy link
Member

You can do this by explicitly constructing the regex:

julia> start="AGCAT"
"AGCAT"

julia> BioSequences.RE.Regex{DNA}(start * "[ACGT]+", :pcre)
biore"AGCAT[ACGT]+"dna

This functionality ought to be exposed - in general it's good style that, whenever you have a macro exported, also export the equivalent function.

@jakobnissen jakobnissen changed the title how can I make a dynamic regex search? Export RE.Regex, and make constructors easier. Jul 16, 2021
@jakobnissen jakobnissen added this to the v3.0.0 milestone Jul 16, 2021
@jakobnissen
Copy link
Member

Resolved in #169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants