You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, it matches `match:8`, from `subject:-18`. To exclude it, we need to ensure that the regexp starts matching a number not from the middle of another (non-matching) number.
16
+
এখানে দেখতে পাচ্ছি, `subject:-18` এর মিল `match:8`। এটিকে বাদ দিতে হলে, আমাদের নিশ্চিত হতে হবে রেগুলার এক্সপ্রেশনটি অন্য সংখ্যার মাঝে যাচাই করবে না।
17
17
18
-
We can do it by specifying another negative lookbehind: `pattern:(?<!-)(?<!\d)\d+`. Now`pattern:(?<!\d)`ensures that a match does not start after another digit, just what we need.
18
+
এজন্য আমরা আরো একটি লুকবিহাইন্ড ব্যবহার করতে পারি: `pattern:(?<!-)(?<!\d)\d+`। এখন`pattern:(?<!\d)`এর দ্বারা নিশ্চিত করছি কোন ম্যাচ অন্য ডিজিটের মাঝ থেকে যাচাই করবে না।
19
19
20
-
We can also join them into a single lookbehind here:
In the replacement string `$&` means the match itself, that is, the part of the source text that corresponds to `pattern:<body.*>`. It gets replaced by itself plus `<h1>Hello</h1>`.
15
14
16
-
An alternative is to use lookbehind:
15
+
রিপ্লেসমেন্ট স্ট্রিংয়ে `$&` দ্বারা বুঝায় মিলের কন্টেন্টটি অর্থাৎ সোর্সের ট্যাক্সটি `pattern:<body.*>`। মিলকৃত কন্টেন্টটি অতঃপর `<h1>Hello</h1>`।
As you can see, there's only lookbehind part in this regexp.
26
+
এখানে দেখতে পাচ্ছি, এখানে রেগুলার এক্সপ্রেশনে শুধুমাত্র লুকবিহাইন্ডের অংশটি আছে।
26
27
27
-
It works like this:
28
-
-At every position in the text.
29
-
-Check if it's preceeded by `pattern:<body.*>`.
30
-
-If it's so then we have the match.
28
+
এটি এভাবে কাজ করছে:
29
+
-টেক্সটের প্রতিটি পজিশনে।
30
+
-যাচাই করছে পূর্বে `pattern:<body.*>` আছে কিনা।
31
+
-যদি থাকে তাহলে আমাদের মিলটি পাব।
31
32
32
-
The tag `pattern:<body.*>`won't be returned. The result of this regexp is literally an empty string, but it matches only at positions preceeded by `pattern:<body.*>`.
33
+
`pattern:<body.*>`ট্যাগটি রিটার্ন করবে না। সুতরাং রেজাল্ট হবে এম্পটি স্ট্রিং, কিন্ত ম্যাচটির অবস্থান হবে `pattern:<body.*>` এর পরের অবস্থানটি।
33
34
34
-
So we replaces the "empty line", preceeded by `pattern:<body.*>`, with`<h1>Hello</h1>`. That's the insertion after `<body>`.
35
+
সুতরা আমরা "empty line" টিকে রিপ্লেস করব `<h1>Hello</h1>` দ্বারা যার পূর্বে `pattern:<body.*>` আছে। সুতরাং নতুন ট্যাগটি হবে `<body>` এর পর।
35
36
36
-
P.S. Regexp flags, such as `pattern:s`and`pattern:i`can also useful: `pattern:/<body.*>/si`. The `pattern:s`flag makes the dot `pattern:.`match a newline character, and`pattern:i`flag makes `pattern:<body>`also match `match:<BODY>`case-insensitively.
0 commit comments