Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
**Hi, I have written regex. in here i want select only value insdie **
[buttonRouter, CheckBoxModule, RadioButtonModule, DropDownButtonModule, SplitButtonModule, SwitchModule, SharedModule, ProgressButtonModule]
Instead of this it select
imports: [buttonRouter, CheckBoxModule, RadioButtonModule, DropDownButtonModule, SplitButtonModule, SwitchModule, SharedModule, ProgressButtonModule]
My requirement, regex has to select values only inside imports: [value]
This regex should return only return the value part but still look for "imports: ":
(?<!:imports: )\[.+\]
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 14 days ago.
This post was edited and submitted for review 14 days ago.
Improve this question
In a text with many lines in notepad++, some lines are unintentionally broken into the next line without an end point. I want to merge lines that are more than 10 characters long that do not end with a dot(.) with of regex. Also put a space between merged lines.
For example, the following text:
tttttttttt
aaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbb.
ccccccccccccccccc
dddddddddddddddddd.
Convert to:
tttttttttt
aaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbb.
ccccccccccccccccc dddddddddddddddddd.
I also tried the following regex code but it didn't work:
[^\.]\n
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have list of packages like this (it's bigger than this):
accounts-qml-module-0.7-3
accountsservice-0.6.55-3
alsa-firmware-1.2.1-2
alsa-oss-1.1.8-3
alsa-plugins-1:1.2.2-2
alsa-utils-1.2.3-2
augeas-1.12.0-2
baloo-5.74.0-1
baloo-widgets-20.08.1-1
binutils-2.35-2
breath2-icon-themes-1.0.10-2
breath2-wallpaper-1.0.10-2
bridge-utils-1.7-1
brltty-6.0-11
cfitsio-1:3.49-1
clucene-2.3.3.4-11
colord-sane-1.4.4+9+g1ce26da-2
confuse-3.3-1
containerd-1.4.1-1
convertlit-1.8-10
cpio-2.13-2
cracklib-2.9.7-2
cronie-1.5.5-1
cups-2.3.3-3
cups-filters-1.28.3-1
cups-pdf-3.0.1-5
cups-pk-helper-0.2.6-4
debootstrap-1.0.123-1
dhcpcd-9.2.0-1
diffutils-3.7-3
ding-libs-0.6.1-3
discount-2.2.7-1
djvulibre-3.5.27-6
dkms-2.8.3-1.1
docbook-xml-4.5-9
docbook-xsl-1.79.2-7
I'd like to have:
accounts-qml-module
accountsservice
alsa-firmware
alsa-oss
alsa-plugins
alsa-utils
augeas
baloo
baloo-widgets
but I don't really know how to do since there are some packets that have a "-" dash inside and I'm very confused about how could I achieve this avoiding to do it manually...
Is there a bash "trick" to do it?
try this regex :
^.+?(?=-[\d.\-:+]+)
demo
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Data: Mumbai, India (June 8 2019)
using the below code I have extracted June 8 from above data:
Regexp_replace(Extract_Regexp("Mumbai, India (June 8)" ,r"\((.*)$"),r"\)(.*)","")
Then extracted 8 from "June 8" using below code:
Extract_Regexp("June 8" ,r"\ (.*)$")
Now I want to convert final output: 08/06/2019
this may be you get some idea.
[^\d ]+
Match value:
1. june
https://rubular.com/r/3OR5xSF1gE1rrt
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I am struggling through this date extraction. I have a date like this
("D("yyyy-mm-dd")).
I want to get this "yyyy-mm-dd" and I cannot strip ("D(") this also because I have this format in other places so I tried like this
first searching the string but I am not sure if I am on right track
eg. intabc = istrdate.SearchSubString("D(");
so please suggest how can I get this value.
Input is
"(D(YYYY-MM-DD))"
OUTPUT that I want
(YYYY-MM-DD)
What i have done(not correct way I think )
intabc = istrdate.SearchSubString("D(");
you can use substr() and string::erase() functions in c++98
string str = "\"D(\"yyyy-mm-dd\")";
string result = str.substr(3);
result.erase(result.end() - 1)
result.erase(result.end() - 1)
if you are using c++11 you can also use string::pop_back() method.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
This post was edited and submitted for review 1 year ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
I need to replace words like "{can't, don't, won't }" by "{can not, do not, would not}" using python
The problem is:
"can't" can be detected by checking suffix "n't", so we can replace "n't" by "not"
But how can we transform "ca" to "can" as when we split "can't" it should be transformed to "can not"?
Since the rules of English are large and sometimes inconsistent, your best bet is probably just to set up full word maps rather than trying to figure out on the fly which letters are represented by the apostrophe.
In other words, a dictionary with values like:
can't -> can not
don't -> do not
won't -> will not
:
oughtn't -> ought not